Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: ANSI bg colour outside of prompt area



23.02.2015, 04:23, "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxx>:
> On Feb 23, 12:55am, ZyX wrote:
> } Subject: Re: ANSI bg colour outside of prompt area
> }
> } > That's intentional so that a misbehaving program can't e.g. cause your
> } > prompt to become invisible by changing the background to the same color
> } > as your prompt foreground.
> }
> } I am wondering whether same thing may apply to \C-n (0x0E, Shift Out).
> } It is the second annoying thing that may garble everything, much more
> } annoying since it changes the view of most characters and I have to
> } type either `echo $'\ec'` or `echo $'\c-o'`.
> }
> } I mean, whether it makes sense to output \C-o to drop SO mode by
> } default just like it is done currently with colors.
>
> Hrm.  The Lock Shift feature to chose character sets is a lot less common,
> the prompt code would actually have to check that the G0 capability is
> present in the terminal definition, etc.  I'm not personally familiar with
> the terminal handling code in prompt.c ... on brief examiniation I can't
> even find where it's emitting color reset and clear-screen.
>
> Still, there's no reason you can't put $'%{\CO%}' at the front of $PS1.
> Or putting that in $PROMPT_EOL_MARK might work as well.

I have actually put this into `precmd_functions` array. And am experiencing weird behavior since the time I put it: character set is not changing on SO ever since I started to emit \C-o in konsole.

I mean, I start a new terminal using konsole -e zsh -f and it does not change character set on `echo $'\C-n'`. Need to change to fbterm (framebuffer terminal) to see the switch; this one is not going to lock on \C-o mode.



Messages sorted by: Reverse Date, Date, Thread, Author