How do I make less STOP chopping long lines by default?

How do I make less STOP chopping long lines by default?

The web seems to be full of resources for making less stop wrapping long lines by default and chop them instead. I have the opposite problem. It is chopping be default and I want to make it stop. I want word wrapping turned back on by default, but all I can find are instructions for the other way around. I've tried reversing them, but none of the methods seem to be employed to be reversed.

My problem developed about a month ago and is across a number of systems. I suspect it might actually be my dotfiles somewhere, but for the life of me I can't find it.

  • less is not aliased to anything in my shell, it is not a function, nor am I getting some binary other than the system default:

    $ which less
    /usr/bin/less
    
  • I am not running with the -S argument:

    $ ps waux | grep less
     caleb     3151  0.0  0.0  13592  1036 pts/14   S+   16:06   0:00 less
    
  • I do not have anything set in ~/.lesskey:

    $ cat ~/.lesskey
    cat: /home/caleb/.lesskey: No such file or directory
    

And yet line chopping is turned on everywhere it is instantiated. I have to turn it off with -SEnter every time.

The man page clearly states this is the opposite of the expected behavior:

$ man less
...
    -S or --chop-long-lines
        Causes lines longer than the screen width to be chopped (truncated)
        rather than wrapped.  That is, the portion  of  a  long line that does
        not fit in the screen width is not shown. The default is to wrap long
        lines; that is, display the remainder on the next line.
...

Because it is a default there doesn't seem to be a command line switch to turn this off. Where else could this be getting set so I can find it and eradicate it?

答案1

Options are also taken from the LESS environment variable. Check if it has been set with echo "$LESS".

相关内容