Sample Header Ad - 728x90

less +S rings bell on first screen?

1 vote
1 answer
35 views
As a result of the answer to [this question](https://stackoverflow.com/questions/72367806) , I have begun setting LESS=+S. However, I have discovered that this causes less to ring the terminal bell on the first screen. This happens on the first screen only, not subsequent screens. I can inhibit the bell by using -Q, but that causes a "visible bell" on the first screen, instead. So clearly less is trying to warn me about something. I assumed the bell was part of the first prompt, but it's not. Running inside script(1) reveals that the bell character is coming out immediately before the first line of the first screen of output. I'm encountering this on several different systems, so I don't think it's version- or system-dependent. Does anyone know why this alert is occurring, or how to suppress or disable it? ---- Addendum: There's some history here: I'm using +S to enable horizontal wrapping in the specific case that git is using less as its pager. It's not clear how git is disabling horizontal wrapping, but it now appears — see the answer below — that globally setting LESS=+S is not necessarily the right way to reenable it.
Asked by Steve Summit (918 rep)
Jun 27, 2025, 02:22 PM
Last activity: Jun 27, 2025, 04:13 PM