public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Globally Disable Prompt Formatting, In All Programs Everywhere For All Time
@ 2018-05-16 21:11 R0b0t1
  2018-05-16 21:53 ` [gentoo-user] " Ian Zimmerman
  2018-05-17 17:07 ` [gentoo-user] " Grant Taylor
  0 siblings, 2 replies; 3+ messages in thread
From: R0b0t1 @ 2018-05-16 21:11 UTC (permalink / raw
  To: gentoo-user

Hello,

This has come up on this list a few times in slightly more restricted
forms. Today, I feel the need to ask about how to Globally Disable
Prompt Formatting, In All Programs Everywhere For All Time.

The issue is that over some transports, e.g. a debug serial link, with
an actual serial port, the receiving program may not be able to
interpret escape codes. Typically this is an issue when on Windows,
though PuTTY exists. On Gentoo screen will work nicely, but is a bit
heavy.

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

Cheers,
     R0b0t1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [gentoo-user] Re: Globally Disable Prompt Formatting, In All Programs Everywhere For All Time
  2018-05-16 21:11 [gentoo-user] Globally Disable Prompt Formatting, In All Programs Everywhere For All Time R0b0t1
@ 2018-05-16 21:53 ` Ian Zimmerman
  2018-05-17 17:07 ` [gentoo-user] " Grant Taylor
  1 sibling, 0 replies; 3+ messages in thread
From: Ian Zimmerman @ 2018-05-16 21:53 UTC (permalink / raw
  To: gentoo-user

On 2018-05-16 16:11, R0b0t1 wrote:

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

I was going to suggest setting TERM=dumb in the environment, but
... already the first program I tried (equery) doesn't honor it, so not
much hope there.

-- 
Please don't Cc: me privately on mailing lists and Usenet,
if you also post the followup to the list or newsgroup.
To reply privately _only_ on Usenet and on broken lists
which rewrite From, fetch the TXT record for no-use.mooo.com.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [gentoo-user] Globally Disable Prompt Formatting, In All Programs Everywhere For All Time
  2018-05-16 21:11 [gentoo-user] Globally Disable Prompt Formatting, In All Programs Everywhere For All Time R0b0t1
  2018-05-16 21:53 ` [gentoo-user] " Ian Zimmerman
@ 2018-05-17 17:07 ` Grant Taylor
  1 sibling, 0 replies; 3+ messages in thread
From: Grant Taylor @ 2018-05-17 17:07 UTC (permalink / raw
  To: gentoo-user

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-05-17 17:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-16 21:11 [gentoo-user] Globally Disable Prompt Formatting, In All Programs Everywhere For All Time R0b0t1
2018-05-16 21:53 ` [gentoo-user] " Ian Zimmerman
2018-05-17 17:07 ` [gentoo-user] " Grant Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox