On 05/16/2018 03:11 PM, R0b0t1 wrote:
Today, I feel the need to ask about how to Globally Disable Prompt Formatting, In All Programs Everywhere For All Time.


I'm not aware of a universal way to disable prompt formatting.

Are you talking specifically about the shell prompt?

What other things are using prompt formatting? (I've added it to a few things via rlwrap, but I doubt that's the case here.)

Is the only way to find every program that generates escape sequences and disable it? What about kernel messages during boot?

I want to say that things should be leveraging TERMCAP and the TERM environment variable. However, I don't think /any/ of the things that I've read about (shell) prompt formatting have taken TERMCAP into account. Instead they all seem to echo raw vt100 escape codes directly.

I don't even know how to pass through something like TERMCAP to leverage the TERM environment variable setting.

I don't know if it's your case or not, but if you are talking about the shell's PROMPT blindly echoing escape characters and impacting various terminal emulators that you're using, I think the shell itself is the first (and likely only) place to look.

I have personally run into this problem and solved it differently. I configure a fairly fancy prompt (both left and right in Zsh). But I do so conditionally based on what the answer back value is. Part of my shell's init scripts query the answer back and expect specific values. If those values aren't seen, then a very simple prompt (without any escape codes) is used.

This means that I must configure my terminal (emulators) to reply with something (usually the host name) and then tweak my init script to match the host name as a known safe place for my fancy prompt.

I doubt that this directly answers your question, nor do I know if it helps or not. Hopefully it gives you food for thought.



--
Grant. . . .
unix || die

Reply via email to