This change adds support for determining the editor that should be opened by the RAD_EDITOR environment variable, which takes priority over both VISUAL and EDITOR, as it is specific to the radicle application.
This enables users to set a different editor specifically for radicle, which is useful in the event that the normal value for either VISUAL or EDITOR is a process that forks and exits early, but supports command line flags to modify this behavior and block on the main thread (e.g. neovim-remote, which the author uses).
This change adds support for determining the editor that should be opened by the RAD_EDITOR environment variable, which takes priority over both VISUAL and EDITOR, as it is specific to the radicle application.
This enables users to set a different editor specifically for radicle, which is useful in the event that the normal value for either VISUAL or EDITOR is a process that forks and exits early, but supports command line flags to modify this behavior and block on the main thread (e.g. neovim-remote, which the author uses).
Hey, thanks for the contribution!
I understand why this may be useful; you gave a good example below!
However, I’m going to push back on this a bit because this would mean
that we need to maintain support for RAD_EDITOR.
I’m wondering if there are any other ways in which you could do this, e.g.:
- Prefix calling
radwithEDITOR– might be verbose for you. - Setting
Editorwhen you’re in Radicle repositories – might be annoying to then switch the editor when you want the forked process. - Some hook to set
EDITORwhen callingrad– I’m not sure what that would be, maybe a shell function?