Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
term/editor: add support for RAD_EDITOR
✗ 0/1 checks passed did:key:z6MksGpP...MGuV wants to merge 1 commit into master · opened 2 months ago

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).

Some checks failed — 0 passed, 1 failed View logs ↗
did:key:z6MksGpP...MGuV opened with revision f01d19d759b6714887e528993cd5dd83fc616861 on base 7bac17146c40b32b2ce0e27b96a555a44f3ef2ba +6 -2 2 months ago
did:key:z6MksGpP...MGuV pushed revision 2 3bc7812820dca34f590a9a077bd9c602bad4cf4a on base 7bac17146c40b32b2ce0e27b96a555a44f3ef2ba +6 -2 2 months ago
did:key:z6MkireR...3voM commented on revision 1 2 months ago

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 rad with EDITOR – might be verbose for you.
  • Setting Editor when you're in Radicle repositories – might be annoying to then switch the editor when you want the forked process.
  • Some hook to set EDITOR when calling rad – I'm not sure what that would be, maybe a shell function?
did:key:z6MkrxqT...yQRh commented on revision 1 2 months ago

Nice idea!