[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bash,TITLEBAR, and line wrapping
From: |
Ian A. Tegebo |
Subject: |
Re: bash,TITLEBAR, and line wrapping |
Date: |
Sun, 23 Apr 2006 12:40:57 -0700 |
User-agent: |
Mutt/1.5.9i |
On Sun, Apr 23, 2006 at 07:06:29AM +0200, Peder Stray wrote:
> 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\]'
Worked like a charm, many thanks.
--
Ian Tegebo
- bash,TITLEBAR, and line wrapping, Ian A. Tegebo, 2006/04/22
- Re: bash,TITLEBAR, and line wrapping, Ian A. Tegebo, 2006/04/22
- Re: bash,TITLEBAR, and line wrapping, Peder Stray, 2006/04/23
- Re: bash,TITLEBAR, and line wrapping,
Ian A. Tegebo <=