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

Re: ANSI bg colour outside of prompt area



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.



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