Por sugestão do mdpc, eu olhei os aliases e descobri que o meu .bashrc estava usando aliasing less
com less -r
para que menos pudesse exibir as cores. Remover esse alias e, assim, remover o sinalizador -r
corrigiu o problema e fez com que o sinalizador -S
produzisse o comportamento esperado.
De man less
:
-r or --raw-control-chars
Causes "raw" control characters to be displayed. The default is to display control characters using the caret nota-
tion; for example, a control-A (octal 001) is displayed as "^A". Warning: when the -r option is used, less cannot
keep track of the actual appearance of the screen (since this depends on how the screen responds to each type of con-
trol character). Thus, various display problems may result, such as long lines being split in the wrong place.
Portanto, -r
parece quebrar -S
, compreensivelmente.