On 11/07/2024 22:56, Greg Wooledge wrote:
On Thu, Jul 11, 2024 at 22:43:58 +0700, Max Nikulin wrote:On 10/07/2024 20:55, Greg Wooledge wrote:test -t 0 && stty -ixonI have a question opposite to the original one. Is it possible to disable xon&xoff for bash prompt, but enable it while foreground commands are running? Sometimes I use [Ctrl+s] to pause verbose output of some tool. On the other hand I do not mind to use forward search in readline history.In theory... you could run "stty -ixon" in the PROMPT_COMMAND variable, and "stty ixon" in a DEBUG trap.
It seems PS0='$(stty ixon 2>/dev/null)' might be a better variant. I have not tested it thoroughly yet.
I just have realized that enabling semantic terminal-shell integration in konsole merely injects
if [[ ! $PS1 =~ 133 ]] ; then PS1='\[\e]133;L\a\]\[\e]133;D;$?\]\[\e]133;A\a\]'$PS1'\[\e]133;B\a\]' ; PS2='\[\e]133;A\a\]'$PS2'\[\e]133;B\a\]' ; PS0='\[\e]133;C\a\]' ; fi and it allows to mark prompt, command, and output. https://per.bothner.com/blog/2019/shell-integration-proposal/ https://docs.kde.org/stable5/en/konsole/konsole/semantic-shell-integration.html