When doing "sudo -e /etc/whatever" to edit config files I noticed it was wrapping lines. Yes, "sudo nano -w /etc/whatever" works fine but wouldn't it make sense to change line 13 of /etc/rc.conf to read: EDITOR="/bin/nano -w" I've made this change myself and have no problems now. Or would this have side-effects that I don't quite understand? Cheers Alex Reproducible: Always Steps to Reproduce: 1. 2. 3.
it would affect everyone, not just root also, some programs execute $EDITOR assuming it contains no arguments, so this change would also break that ...
nano now builds with --disable-wrapping-as-root by default
Eek! Erm, to tell you the truth I'm not too keen on that idea... hear me out. How about instead of building it so that it behaves differently for different users (think `crontab -e` for a normal user, that's gonna mess up, too)... Build a text executable, and call it /bin/nanow or something, which is basically ============================= #!/bin/sh nano -w $* ============================= That way you can still pass parameters to it (although you can't cancel the -w, if you want that use regular `nano`? And we can use it as the EDITOR variable and applications that expect it to be an executable will see it that way. What do you think?
not worth the effort imo
OK, well we still have a broken `crontab -e` out of the box then... :( file a separate bug for that? Why do you think it's too much effort? nanow is easier to type than nano -w anyway, and it's not like it requires much to hack a text executable into the ebuild for nano, is it?
i dont see how `crontab -e` is broken if you want to disable line wrappings, set 'nowrap' in your /etc/nanorc or ~/.nanorc or hit alt+l while running nano
'crontab -e' is broken for normal users as their EDITOR evar is '/bin/nano'. Try typing a cron line and it will wrap over. I understand some people use text based mail apps which rely on EDITOR... so that complicates things. How do distros that default to vim cope?