2022-02-03
This commit is contained in:
parent
f86b8496ec
commit
db393215ce
55 changed files with 1907 additions and 0 deletions
33
home/dot-local/share/bash/history.sh
Normal file
33
home/dot-local/share/bash/history.sh
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
# -*- mode: bash -*-
|
||||
|
||||
# append to the history file, don't overwrite it
|
||||
shopt -s histappend
|
||||
|
||||
# save multi-line commands as one command
|
||||
shopt -s cmdhist
|
||||
|
||||
# use readline on history
|
||||
shopt -s histreedit
|
||||
|
||||
# load history line onto readline buffer for editing
|
||||
shopt -s histverify
|
||||
|
||||
# use standard ISO 8601 timestamp
|
||||
# %F equivalent to %Y-%m-%d
|
||||
# %T equivalent to %H:%M:%S (24-hours format)
|
||||
TIME_LONG='%F %T'
|
||||
TIME_DEFAULT="${TIME_LONG}"
|
||||
|
||||
HISTCONTROL="erasedups:ignoredups:ignorespace"
|
||||
HISTSIZE=500000
|
||||
HISTFILESIZE="${HISTSIZE}"
|
||||
HISTFILE="${HOME}/.local/state/bash/history"
|
||||
HISTTIMEFORMAT="${TIME_DEFAULT} "
|
||||
|
||||
export HISTFILE HISTSIZE HISTFILESIZE HISTCONTROL HISTTIMEFORMAT
|
||||
|
||||
# enable incremental history search with up/down arrows
|
||||
bind '"\e[A": history-search-backward'
|
||||
bind '"\e[B": history-search-forward'
|
||||
bind '"\e[C": forward-char'
|
||||
bind '"\e[D": backward-char'
|
||||
Loading…
Add table
Add a link
Reference in a new issue