summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.bashrc8
1 files changed, 7 insertions, 1 deletions
diff --git a/.bashrc b/.bashrc
index d77d158..9bc6ef7 100644
--- a/.bashrc
+++ b/.bashrc
@@ -19,8 +19,14 @@ bind -s 'set completion-ignore-case on'
# title
set_title () { printf "\e]2;%s\e\\" "$1"; }
_lastcmd () { history 1 | sed -e 's/^ *[0-9]* *//g' ; }
+_dirtitle () {
+ if [ -n "$SSH_CONNECTION" ]; then
+ echo "$(uname -n):"
+ fi
+ apwd
+}
trap 'set_title "$(_lastcmd)"' DEBUG
-PROMPT_COMMAND='history -a; set_title "$(apwd)"'
+PROMPT_COMMAND='history -a; set_title "$(_dirtitle)"'
# aliases
. ~/.aliases.bashrc