Setting nano as default editor not working for crontab with fish shell
-
30-05-2021 - |
Pergunta
I want to set nano as default editor for crontab on my Mac.
This works:
VISUAL=nano crontab -e
but this don't work
set -U VISUAL nano
crontab -e
here still vim is used as default editor
ECHO $VISUAL
shows
nano
as value.
Any ideas where is my mistake?
Solução
set -U VISUAL nano
only sets the variable within Fish. If you want to make it visible also in binaries started by the shell you need to export it, e.g. by using set -Ux VISUAL nano
.
For more details
Licenciado em: CC-BY-SA com atribuição
Não afiliado a apple.stackexchange