1
Is it possible to make nano wrap on $ on very long lines?
I regularly have to check log file and then copy and paste the contents into an email for example (I want to use mouse select - Ctrl U does work but it is cumbersome especially with lots of lines) but all I can copy and paste is what is visible on the screen which means that often the most important parts of lines in the exim log, for example, are left behind.
I have commented out the line "set nowrap" and uncommented set fill -8 in /etc/nanorc to no avail. I also tried starting nano with
nano -Ws$ file.log
and also
nano -r60 file.log
but it makes no difference and the lines with $ still take up more than I can see and therefore copy. Can it be made to wrap on the $? If not, is there another easier way of working with log files from the command line?
Thanks
Tried that but I get an error nano: invalid option -- '$' – bhttoan – 2014-01-14T14:39:35.867
Did you try eventually separate? "nano -wS -$ file.log" or the long version? "nano -wS --softwrap" – fede.evol – 2014-01-14T15:07:16.887
All give the same error invalid option with $ for first two and --softwrap for second one – bhttoan – 2014-01-14T15:16:39.933
Looks like it could be a version matter: it seems some pre 2.2.0 didn't have this working out. Check your nano version or if possible upgrade it to a post 2.2.0.
For now for logs I'd suggest you to use simply "more file.log" or "less file.log" which both wraps on the terminal size by default. – fede.evol – 2014-01-15T05:52:14.317