diff options
Diffstat (limited to 'bash_include')
-rw-r--r-- | bash_include | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/bash_include b/bash_include index 8e7e10d..5647ac4 100644 --- a/bash_include +++ b/bash_include @@ -11,7 +11,7 @@ if tty -s; then interactive_shell=1; fi # Internal Variables -default_tty_setting=`stty -g` +[ "$interactive_shell" ] && default_tty_setting=`stty -g` colorprompting='\[\e[1;31m\]\!\[\e[m\] [\[\e[1;33m\]\u\[\e[m\]@\[\e[1;32m\]\h\[\e[m\] \[\e[1;36m\]\w\[\e[m\]]\$ ' nocolorprompting='\! [\u@\h \w]\$ ' @@ -307,7 +307,13 @@ function prehistory_backup () echo " 4. Run the command \`prehistory_backup' again." return 3 fi - echo "Backing up current history file ($previoushistorycount -> $currentcount)" + echo -n "Backing up current history file ($previoushistorycount -> $currentcount, " + if [ "$previoushistorycount" = "$currentcount" ] + then + echo "no modification)" + else + echo "+$(($currentcount-$previoushistorycount)))" + fi echo "$currentcount" > "$historycountfile" \cp -f "$HISTFILE" "$historybackupfile" } |