To be fair, I’m pretty sure that nano wraps lines by default just like pico does. I did a quick test, and both pico do this when used as an editor for “crontab -e”. Nano is a pico clone, though with some enhancements/ improvements. Either can be called with “-w” to avoid wrapping lines. If you want to be sure not to wrap lines, set $VISUAL to:
(to save the changed file without prompting for the filename - this is great for crontabs, but doesn’t always work properly for other applications that follow $VISUAL / $EDITOR - I believe this is why DH did not set this by default)
So something like:
export VISUAL=“pico -wt”
(bash / ksh / zsh, in your .profile / .bash_profile or whatever; to work for real sh too, declare and export the variable separately)
setenv VISUAL “pico -wt”
(csh / tcsh, in .cshrc or .tcshrc)
While $EDITOR will work too, $VISUAL is the preferred environment variable to use; historically, $EDITOR is your line editor (e.g., ed / ex) and $VISUAL is your full screen editor (e.g., vi / emacs).
Side note - vim also has some funkiness with crontab -e, due to the way it handles backup files. The workaround is to not keep a backup for certain filenames or for files in a certain directory. This results in the maddening “crontab: no changes made to crontab” error, after saving the file in vim.
I think something like this will work (in your .vimrc or in a global Vim config file):
au VimEnter crontab* set nobackup nowritebackup
I always just use nvi instead.