views:

64

answers:

1

I've tried setting my PROMPT_COMMAND variable:

PROMPT_COMMAND='echo -ne "\033]0;"myWindowTitle"\007"'

but something changes my tab (or the whole terminal title) to 'user@hostname:/current/path', thus

PROMPT_COMMAND='echo -ne "\033]0;"myWindowTitle"\007" && sleep 3'

changes title for 3 second only :)

A: 

PROMPT_COMMAND is issued before a prompt is set based on the PS1 variable. Probably you have some character sequence in PS1 which sets your windows title. You may invoke unset PS1 or set it to some other value:

export PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '

Alternatively you can set window title in your PS1 variable:

export PS1='\[\e]0;myWindowTitle\a\]${debian_chroot:+($debian_chroot)}\u@\h:\w\$'
Paweł