.bashrc: Set the terminal titlebar to "user@machine: pwd"

This commit is contained in:
Alan Orth 2013-06-18 15:05:37 +03:00
parent a13bf8bbde
commit 754a6803f5

View File

@ -13,8 +13,10 @@ alias less='less -R' # preserves colors in `less`
PS1='[\u@\h: \w]\$ ' PS1='[\u@\h: \w]\$ '
export EDITOR=/usr/bin/vim export EDITOR=/usr/bin/vim
export PAGER=/usr/bin/less export PAGER=/usr/bin/less
# sequence to set the terminal title to "user@hostname: pwd"
TITLEBAR='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
# Aggressive read/write of history after every command # Aggressive read/write of history after every command
PROMPT_COMMAND='history -a; history -n' PROMPT_COMMAND="$TITLEBAR; history -a; history -n"
# If a private bin directory exists, add it to PATH # If a private bin directory exists, add it to PATH
[[ -d ~/bin ]] && PATH="$PATH:~/bin" [[ -d ~/bin ]] && PATH="$PATH:~/bin"