Skip to content

Latest commit

 

History

History
65 lines (44 loc) · 1.32 KB

edit.1.scd

File metadata and controls

65 lines (44 loc) · 1.32 KB

EDIT(1)

NAME

edit - run configured editor

SYNOPSIS

edit [args...]

DESCRIPTION

edit script runs editor based on environment variables.

  • WAYLAND_EDITOR and WAYLAND_DISPLAY -> run $WAYLAND_EDITOR
  • X11_EDITOR and DISPLAY -> run $X11_EDITOR
  • CLI_EDITOR -> run $CLI_EDITOR
  • no one ise set -> run $EDITOR or vi

ENVIRONMENT

  • WAYLAND_EDITOR: Run on wayland sessions.
  • X11_EDITOR: Run on x11 sessions.
  • CLI_EDITOR: Run if no others are set and this is set.
  • EDITOR: Run if others are not possible.
  • WAYLAND_DISPLAY: If set, this is a wayland session.
  • DISPLAY: If set and WAYLAND_DISPLAY is not set, this is a x11 session.

SEE ALSO

vi(1), vim(1), nano(1), nvim(1), emacs(1), vis(1),

BUGS

Report bugs to kurth4cker's public inbox:

TIPS

If you want to every program execute edit itself. You can set $EDITOR to edit. But you should also set $CLI_EDITOR to avoid infinite self execution of edit:

export WAYLAND_EDITOR=gedit
export CLI_EDITOR=vim
export EDITOR=edit

AUTHORS

Created by kurth4cker [email protected].

HOMEPAGE

https://sr.ht/~kurth4cker/editor-wrapper

SOURCE CODE REPOSITORY

https://git.sr.ht/~kurth4cker/editor-wrapper