At least on MacOS Monterey you don't get the real nano when executing nano, but rather the original fork parent pico.
If you want to use the real deal, you can install and replace pico.
I hope you have homebrew installed.
- Install nano via homebrew:
brew install nano - Tell your Terminal to open homebrew's version of nano (works with zsh) by adding a line to your
.zshrcfile:echo 'alias nano="/opt/homebrew/bin/nano"' >> ~/.zshrcto the .zshrc file - Reload
.zshrcto have the current Terminal also have the new alias:source ~/.zshrc - Tell nano to use syntax highlighting for all types of languages, etc. by writing / creating the
.nanorcfile:echo 'include "/opt/homebrew/share/nano/*.nanorc"' >> ~/.nanorc
All-in-one command: brew install nano && echo 'alias nano="/opt/homebrew/bin/nano"' >> ~/.zshrc && source ~/.zshrc && echo 'include "/opt/homebrew/share/nano/*.nanorc"' >> ~/.nanorc