diff options
author | Lars Wirzenius <liw@liw.fi> | 2016-06-14 20:29:12 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2017-01-15 16:11:41 +0200 |
commit | 7c93a2569d0ba08b82d50099f874f1b33cea194c (patch) | |
tree | 72287ef011e1dfc61b19620c4793291191623b3a /bashrc | |
parent | d177c03765293feb132f09075576303890427836 (diff) | |
download | liw-dot-files-7c93a2569d0ba08b82d50099f874f1b33cea194c.tar.gz |
Add cwd to PS1
Diffstat (limited to 'bashrc')
-rw-r--r-- | bashrc | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -66,7 +66,7 @@ prompt_command() { fi base="`basename "$PWD"`" str2xterm "$base - $iconpart$PWD" "$base - $titlepart$PWD" - PS1="\\[$(start_bold)\\]$debian_chroot\\u@\\h$(git_prompt_part)\\$ \\[$(normal_mode)\\]" + PS1="\\[$(start_bold)\\]$debian_chroot\\u@\\h$(git_prompt_part)$(basename_mode)(\w)$(start_bold)\\$ \\[$(normal_mode)\\]" } we_have_term() @@ -74,6 +74,14 @@ we_have_term() [ "$TERM" ] && [ "$TERM" != dumb ] } +basename_mode() +{ + if we_have_term + then + tput dim + fi +} + start_error() { if we_have_term |