How am i supposed to change default CLI text editor to nano?

I’ve tried adding set -x EDITOR nano to zsh config, tried browsing cachyos-config.zsh but couldn’t figure it out. Any help is appreciated, thanks.

Ok so generally if you want to set the default editor you would add a line with export EDITOR=nano to your ~/.zshrc file
keep in mind this won’t apply to other users such as root.
If you want the default text editor to be nano completely across all users you would open /etc/environment and add the line EDITOR=nano
log out and login or reboot your machine if you choose to edit /etc/environment in order to have the change take effect.

1 Like

I do not know if it helps but try this:

sudo nano usr/share/cachyos-zsh-config/cachyos-config.zsh

and add to the end of the file:

export EDITOR=nano

Restart terminal.