By default, nano hard wraps long lines. This is a problem for editing /etc/fstab, for example. A workaround is to invoke as "nano -w" or to add "set nowrap" to the config file. But nano supports --disable-wrapping-as-root being passed to configure. This lets commands like su -c "nano /etc/fstab" or sudo nano /etc/fstab work as expected. Unfortunately, this doesn't help commands like sudo -e /etc/fstab when nano is $EDITOR, because here sudo creates a temp file, and invokes the editor with the user's normal permissions. For this reason Debian builds nano with --disable-wrapping (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=513443), though this might not be the right trade-off for Fedora.
Thanks for pointing this out! I am fine with changing the default, but there is no reason to limit the functionality of nano. Let user make the final decision if wrap or not wrap. This simple command solves the problem for me: # echo set nowrap > /etc/nanorc We can ship such file along with the nano package. What's your opinion?
Yup, that works, and I'd be happy with it. Thanks. (I think "unset nowrap" can undo the effect of --disable-wrap, but an advantage of your suggestion is that it's clearer that the default behaviour's being overridden.)
(In reply to comment #2) > Yup, that works, and I'd be happy with it. Thanks. No problem, I'll do a build for F-13 next week. > (I think "unset nowrap" can undo the effect of --disable-wrap, but an advantage > of your suggestion is that it's clearer that the default behaviour's being > overridden.) Nope, this can't work since the wrapping code is not compiled at all with --disable-wrapping. It's easy to give it a try.
built as nano-2.0.9-5.fc13
nano-2.0.9-4.fc12 has been submitted as an update for Fedora 12. http://admin.fedoraproject.org/updates/nano-2.0.9-4.fc12
nano-2.0.9-4.fc12 has been pushed to the Fedora 12 stable repository. If problems still persist, please make note of it in this bug report.