[darcs-users] How to set external editor ?

Karl O. Pinc kop at karlpinc.com
Fri Sep 3 19:51:32 UTC 2021


On Fri, 03 Sep 2021 21:28:34 +0200
Alexis Praga <alexis.praga at gmail.com> wrote:

> I'm using the fish shell and am having trouble to tell darcs to use
> neovim.
> 
> Setting  EDITOR, VISUAL and even DARCSEDITOR to ``
> does not seem to do anything. `darcs record` seems to try to start
> nano (and fails to find it):
> > /bin/sh: nano: not found  
> then continues to starts vi.

You probably need to set your environment variable
and export it.  If you don't export a variable the
variable is not available to spawned processes.

I am unfamiliar with fish, but this is what the borne
shell needs:


DARCS_EDITOR=/usr/local/bin/nvim
export DARCS_EDITOR

or just

export DARCS_EDITOR=/usr/local/bin/nvim



This from "darcs help environment" (which is why you get nano):

DARCS_EDITOR, VISUAL, and EDITOR:
  To edit a patch description of email comment, Darcs will invoke an
  external editor.  Your preferred editor can be set as any of the
  environment variables $DARCS_EDITOR, $VISUAL or $EDITOR.
  If none of these are set, nano is used.  If nano crashes or is not
  found in your PATH, vi, emacs, emacs -nw and (on Windows) edit are
  each tried in turn.


Karl <kop at karlpinc.com>
Free Software:  "You don't pay back, you pay forward."
                 -- Robert A. Heinlein


More information about the darcs-users mailing list