FR: toggle line/word wrap for scrollback (like word wrap in text editors) #4753
Unanswered
jjt
asked this question in
Feature Requests, Ideas
Replies: 1 comment
-
|
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Context: I want a true one-line jujutsu log in a narrow(ish) terminal without any wrapping at all, regardless of the content.
I discovered control chars that control the disabling and setting of auto margin:
\033[?7land\033[?7h(or the more ergonomic way of emitting themtput rmam/tput smam). And I was able to achieve what I wanted:But this has some drawbacks:
jj log, but doesn't work for everything.tput rmam; $CMD_HERE; tput smamevery time, or write a shell fn or aliases.tput rmamand then enter more characters than fit on the screen. Then delete them. And watch previous lines get gobbled up.And then I had a thought:
I don't set word wrap on my editor but I can toggle it on when needed. Why should my terminal be any different?
Yes, I can use a pager. Yes, I can use
less -Swhich allows horizontal scrolling. Problems with this approach:less -Fwhich automatically quitslessif the content is less than one page tall, and adding-Soverrides-Fwhen one or more lines are longer than the number of columns, which makes sense since there's something to horizontally page to, so quitting on short-but-wide output defeats the purpose of-SFor more context, I'm on macOS 15.1, using ghostty and zsh.
Beta Was this translation helpful? Give feedback.
All reactions