diff options
| author | Thomas Voss <mail@thomasvoss.com> | 2026-03-29 23:20:52 +0200 |
|---|---|---|
| committer | Thomas Voss <mail@thomasvoss.com> | 2026-03-29 23:20:52 +0200 |
| commit | ccf690c0b78f13660e60625f698178638c7d2639 (patch) | |
| tree | 0045eb81bdfd2221cb232dc58d5754b42aedc972 /doasedit.8 | |
| parent | 0ad0d067d771c39e0895a80d93de95e98ac20ef2 (diff) | |
Add the DOASEDIT_EDITING environment variable
Diffstat (limited to 'doasedit.8')
| -rw-r--r-- | doasedit.8 | 45 |
1 files changed, 39 insertions, 6 deletions
@@ -16,7 +16,7 @@ .\" TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR .\" PERFORMANCE OF THIS SOFTWARE. .\" -.Dd November 14, 2022 +.Dd Match 25, 2026 .Dt DOASEDIT 8 .Os .Sh NAME @@ -46,18 +46,51 @@ is tried instead. If both environment variables are not set then .Xr vi(1) is used as a fallback. +.Pp +By default +.Nm +will create a temporary file in +.Ev TMPDIR . +If +.Ev TMPDIR +is not set it will fallback to using +.Pa /tmp . +.Pp +When editing a file the +.Ev DOASEDIT_EDITING +environment variable will be set to the absolute path of +.Ar file . +Editors can use this to ensure that filetype-specific configurations are +properly applied. .Sh EXIT STATUS .Ex -std .Sh ENVIRONMENT .Bl -tag -width Ds -.It Ev VISUAL -The editor to use to edit the target text file. -If the VISUAL variable is not set, then EDTIOR is used as a fallback. +.It Ev DOASEDIT_EDITING +The absolute path to the root-protected file currently being edited. .It Ev EDITOR -The editor to use to edit the target text file if VISUAL is not set. -If the EDITOR variable is not set, then the command +The editor to use to edit the target text file if +.Ev VISUAL +is not set. +If the +.Ev EDITOR +variable is not set, then the command .Xr vi 1 is used. +.It Ev TMPDIR +The directory in which to create the temporary file copy to edit. +If the +.Ev TMPDIR +variable is not set, +.Pa /tmp +will be used as a fallback. +.It Ev VISUAL +The editor to use to edit the target text file. +If the +.Ev VISUAL +variable is not set, then +.Ev EDTIOR +is used as a fallback. .El .Sh SEE ALSO .Xr doas 1 , |