Closed alusiani closed 4 months ago
@alusiani Thanks for the report!
nb
expects an $EDITOR
value representing one command that opens the editor, so the value should be either code
or hx
, but not both. You can also set $NB_EDITOR
independently, which will override the value of $EDITOR
in order to use a specific editor only for nb
.
The --editor
option takes a string as the editor value, e.g., nb editor --editor vim 1
. To reference the value of the $EDITOR
variable, include the dollar sign ($
) and, preferably, quote the variable reference, e.g., nb editor --editor "$EDITOR" 1
.
Finally, there was also a bug in the code that prevented edit --editor
from overriding the value of $EDITOR
. That has been fixed in the latest version in the repository and should be in the next release version.
@xwmx thanks for the reply, I have now taken the nb version of today and indeed it works as documented.
@alusiani Thanks for the report!
nb
expects an$EDITOR
value representing one command that opens the editor, so the value should be eithercode
orhx
, but not both. You can also set$NB_EDITOR
independently, which will override the value of$EDITOR
in order to use a specific editor only fornb
.The
--editor
option takes a string as the editor value, e.g.,nb editor --editor vim 1
. To reference the value of the$EDITOR
variable, include the dollar sign ($
) and, preferably, quote the variable reference, e.g.,nb editor --editor "$EDITOR" 1
.Finally, there was also a bug in the code that prevented
edit --editor
from overriding the value of$EDITOR
. That has been fixed in the latest version in the repository and should be in the next release version.
@alusiani Awesome. The bug fix is now available in the release version as of version 7.11.0. Thanks again!
Hi,
I am using nb v7.10.3. I have not been able to select an editor using
using EDITOR = code, hx and
According to the help the options -e or --editor should allow using the specified editor.
Cheers,