Re: Smile in the terminal prompt



On 5/15/06, Salvatore <salm@xxxxxxxxxxx> wrote:
Hi,
my terminal (bash) prompt is:

PS1='\e[0;31m\]\e[7m[\h - \u] [\w]\e[m\]\e[27m\n[\!]$ '

After upgrading to freebsd 6.1, the prompt looks different:
- it shows two smiles at both end of the first line and the red
background is white.

The smile face is the graphical representation of one of the special
ascii characters (characters #00 through #30); I don't remember
exactly which one. So it seems your prompt is printing the the graphic
of the special character instead of printing the character's function.

Does that happens to you too if you set the prompt above?
I know that the prompt is wrong (it lacks the start invisible chars \[;
a better version could be PS1='\[\e[1;37m\]\[\e[41m\][\h - \u]
[\w]\[\e[0m\]\n[\!]$ '),
but WHY before the upgrade it looked right and now it shows these smiles?

Maybe your shell changed, or your term setting, or your font? My first
guess would be the term setting. For some reason or another your
teminal is reading a special character from your PS1 setting and
printing the graphic of that character.


--
--
Perfection is just a word I use occasionally with mustard.
--Atom Powers--
_______________________________________________
freebsd-questions@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Smile in the terminal prompt
    ... After upgrading to freebsd 6.1, the prompt looks different: ... but WHY before the upgrade it looked right and now it shows these smiles? ...
    (freebsd-questions)
  • Re: IO::Prompt with Keymap
    ... print a Cyrillic prompt, but if you expect the user to type Latin ... This allows only a fixed string to be echoed for each typed character. ... Prompt module somewhere that would allow the echoed character to be ... print $_ and select undef, undef, undef, rand $speed ...
    (comp.lang.perl.misc)
  • Re: Access 2000 Query using "Between Operator"
    ... > I am developing a Query that requires a "Between Operator" ... IF the 3 and 4 character data were excluded ... > have tried enclosing the Prompt field with a Val ...
    (microsoft.public.access.queries)
  • Re: Arrow keys dont work in "read" command of bash
    ... readline is used ... used to remove any special meaning for the next character read ... The first character of delim is used to terminate the ... Display prompt on standard error, ...
    (comp.os.linux.misc)
  • Re: man pdksh, I dont understand this - [ was: how to make colour prompts for pdksh ]
    ... escape codes in the prompt tend to mess things up. ... Okay, I get it, I'm using escape codes, so I need the following ... the escape codes with this non-printing character." ... string in a shell script you're editing with vi, control-v control-@ ...
    (Debian-User)