On Wed, Jul 26, 2006 at 05:34:07PM +0200, Jan Engelhardt wrote:
> >> Heya,
> >> 
> >> 
> >> since SUSE Linux 10.1, bash always reprints the prompt.
> >> 
> >> This created very weird output that is hidden too...:
> >> 
> >> 19:26 shanghai:/var/run/pam_mount > echo -en "abcdefghijklm" >jengelh
> >> 19:26 shanghai:/var/run/pam_mount > cat jengelh
> >> 19:26 shanghai:/var/run/pam_mount > /pam_mount >
> >> 
> >> It looks like it does print $PS1 then '\r' and then $PS1 again. Is there a 
> >> way to turn this off? Besides hiding non-'\n'-output (like from the test 
> >> file), it also slows down remote shell access with high-latency links.
> >
> >Seems to be a problem with your prompt string, here it works:
> >
> > [EMAIL PROTECTED]:~/Tests/beamer> echo -en "abcdefghijklm" >jengelh
> > [EMAIL PROTECTED]:~/Tests/beamer> cat jengelh
> > [EMAIL PROTECTED]:~/Tests/beamer> 
> > [EMAIL PROTECTED]:~/Tests/beamer> echo "$PS1"
> > $(ppwd \l)[EMAIL PROTECTED]:\w> 
> >
> >please note that every special character like terminal escape
> >characters should be enclosed by \[ \] within the prompt strings.
> 
> export PS1="\[\e[1;30m\]\A \[\e[0;32m\]\h:\w > "
> 
> has no problems but
> 
> export PS1="\[\e[1;30m\]\A \[\e[0;32m\]\h:\w \[\e[1m\]> "
> 
> I can't see the problem. Maybe you?

[EMAIL PROTECTED]:~> PS1="\[\e[1;30m\]\A \[\e[0;32m\]\h:\w \[\e[1m\]> "
12:38 Fatou:~ > 
12:38 Fatou:~ > echo -en "abcdefghijklm" >jengelh
12:38 Fatou:~ > cat jengelh
abcdefghijklm12:38 Fatou:~ > 

I don  have any one ... beside a green command line which I do
not like. Try this one

PS1="\\[$(tput bold;tput setaf 0)\\]\\A \\[$(tput sgr0;tput setaf 2)\\]\\h:\\w 
>\\[$(tput sgr0)\\] "
 
should do the same buzt without green command line and it should fit to
the most terminals around even without color.

       Werner

-- 
  "Having a smoking section in a restaurant is like having
          a peeing section in a swimming pool." -- Edward Burr

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to