From 754a6803f579a70efd03a70677ba235bb2e22dba Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Tue, 18 Jun 2013 15:05:37 +0300 Subject: [PATCH] .bashrc: Set the terminal titlebar to "user@machine: pwd" --- .bashrc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.bashrc b/.bashrc index 54bc5b9..6f48212 100644 --- a/.bashrc +++ b/.bashrc @@ -13,8 +13,10 @@ alias less='less -R' # preserves colors in `less` PS1='[\u@\h: \w]\$ ' export EDITOR=/usr/bin/vim 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 -PROMPT_COMMAND='history -a; history -n' +PROMPT_COMMAND="$TITLEBAR; history -a; history -n" # If a private bin directory exists, add it to PATH [[ -d ~/bin ]] && PATH="$PATH:~/bin"