11

Word wrap mode of "less" viewer is disabled by default in the system I work on. According to "less" viewer help, it is disabled with -S or --chop-long-lines flags. I did not find how to force word wrap on my system. Is there any known flag, or any other way, for enabling the mode?

greg-449
  • 109,219
  • 232
  • 102
  • 145
user1952686
  • 339
  • 1
  • 4
  • 12

2 Answers2

26

Word wrapping is disabled using -S. Following the man page, you can reset that option by passing -+S to the command line.

Let's say you have $LESS set to -S, you can re-enable it on the command line with

less -+S file
hek2mgl
  • 152,036
  • 28
  • 249
  • 266
8

You may try using the LESS environment variable. For example, you can put the following into system-wide shell initialization script (/etc/profile for bash/ksh):

 export LESS="-S "
GMichael
  • 2,726
  • 1
  • 20
  • 30