screen-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bash,TITLEBAR, and line wrapping


From: Peder Stray
Subject: Re: bash,TITLEBAR, and line wrapping
Date: Sun, 23 Apr 2006 07:06:29 +0200 (MEST)

On Sat, 22 Apr 2006, Ian A. Tegebo wrote:

I'm having line-wrapping problems.

I've set some bash variables to achieve titlebar and hardstatus
updating:

<code>
case $TERM in
xterm*)
   PROMPT_COMMAND='echo -ne "\033]0;address@hidden: ${PWD}\007"'
;;
screen*)
   PROMPT_COMMAND='echo -n -e "\033k\033\134"'
   TITLEBAR='\033]0;address@hidden   \w \007'
   PS1=${TITLEBAR}'\[\033[1;34m\][\!]\$ \[\033[0m\]'
;;
esac
</code>

you need to put \[ \] around the contents of $TITLEBAR, as this tells the shell it is text that wont show up in the terminal and thus wil not count in the calculation the prompts width.

        TITLEBAR='\[\033]0;address@hidden   \w \007\]'


--
  Peder Stray




reply via email to

[Prev in Thread] Current Thread [Next in Thread]