Question

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?

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with apple.stackexchange
scroll top