diff options
author | Amin Bandali <bandali@gnu.org> | 2019-04-14 01:15:57 -0400 |
---|---|---|
committer | Amin Bandali <bandali@gnu.org> | 2019-04-14 01:15:57 -0400 |
commit | 58a81de3fd19f05e7b213502bd5d22cf70505f15 (patch) | |
tree | 2ea54a912b3c647e432dbcfc2755fbb73c05aa5e | |
parent | 306f0e82fe425b8d47c92d4dbb607bccc83a1493 (diff) | |
download | configs-58a81de3fd19f05e7b213502bd5d22cf70505f15.tar.gz configs-58a81de3fd19f05e7b213502bd5d22cf70505f15.tar.xz configs-58a81de3fd19f05e7b213502bd5d22cf70505f15.zip |
bash: history-related tweaks
-rw-r--r-- | .bashrc | 15 |
1 files changed, 13 insertions, 2 deletions
@@ -1,5 +1,12 @@ -# If not running interactively, don't do anything -# [[ $- != *i* ]] && return +# various bash tweaks +shopt -s histappend +shopt -s cmdhist +HISTSIZE= +HISTFILESIZE= +HISTCONTROL=ignoreboth +HISTIGNORE='ls:l:s:bg:fg:history' +HISTTIMEFORMAT='%F %T ' +stty stop "" # aliases alias ls='ls --color=auto' @@ -21,6 +28,10 @@ aur() { # echo -e "\033[5 q" # blinking echo -e "\033[6 q" # non-blinking + +# If not running interactively, don't do anything else +[[ $- != *i* ]] && return + a_prompt() { cwd=$(pwd | sed -e "s!$HOME!~!" | sed -re "s!([^/])[^/]+/!\1/!g") printf $cwd |