Setting nano as default editor not working for crontab with fish shell 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?
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

Variable Scope
Exporting Variables