sh: Added date stamps to history command
Prepending history with datestamps (which are already correctly saved in my shell history), so I know WHEN I last run a command (roughly) and can also search for the dates using `fzfhistory`.
This commit is contained in:
parent
e2b82b56f9
commit
ebdfb17bb1
2 changed files with 38 additions and 38 deletions
|
@ -49,7 +49,7 @@ alias myip="curl -s icanhazip.com"
|
|||
# fzf
|
||||
if exist fzf; then
|
||||
# Display fuzzy-searchable history
|
||||
alias fzfhistory="history 0 | fzf --tac --height 20"
|
||||
alias fzfhistory="history -l -E -D 0 | fzf --tac --height 20"
|
||||
fzfman() {
|
||||
man "$(apropos --long "$1" | fzf | awk '{print $2, $1}' | tr -d '()')"
|
||||
}
|
||||
|
|
|
@ -105,16 +105,16 @@ zstyle ':completion:*' cache-path "${XDG_CACHE_HOME:-$HOME/.cache}/zshcompcache"
|
|||
### history
|
||||
## Set ZSH History defaults
|
||||
setopt append_history
|
||||
setopt extended_history
|
||||
setopt hist_expire_dups_first
|
||||
setopt hist_ignore_all_dups
|
||||
setopt extended_history # record command start time
|
||||
setopt hist_ignore_dups
|
||||
setopt hist_ignore_all_dups # do not put duplicated command into history list
|
||||
setopt hist_save_no_dups # do not save duplicated command
|
||||
setopt hist_expire_dups_first
|
||||
setopt hist_ignore_space
|
||||
setopt hist_reduce_blanks
|
||||
setopt hist_save_no_dups
|
||||
setopt hist_reduce_blanks # remove unnecessary blanks
|
||||
setopt hist_verify
|
||||
# Share your history across all your terminal windows
|
||||
setopt share_history
|
||||
setopt inc_append_history_time # append command to history file immediately after execution
|
||||
setopt share_history # Share your history across all your terminal windows
|
||||
setopt pushd_ignore_dups
|
||||
#setopt pushd_silent
|
||||
export HISTSIZE=100000
|
||||
|
|
Loading…
Reference in a new issue