Store timestamps in command history

This commit is contained in:
ItsDrike 2022-08-23 10:53:33 +02:00
parent f4d3da10ee
commit fcdd9df1a6
No known key found for this signature in database
GPG key ID: B014E761034AF742
3 changed files with 3 additions and 0 deletions

View file

@ -230,6 +230,7 @@ alias vimwiki='vim -c VimwikiIndex' # Open vimwiki index
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
alias tty-clock='tty-clock -Ssc' # Terminal clock screensaver
alias rick='curl -s -L https://raw.githubusercontent.com/ItsDrike/rickrollrc/master/roll.sh| bash' # Terminal rickroll
alias hist='fc -lt "$HISTTIMEFORMAT" 1'
# If user is not root, pass all commands via sudo/doas
if [ "$(id -u)" -ne 0 ]; then

View file

@ -63,6 +63,7 @@ else
fi
# Other program settings
export HISTTIMEFORMAT="%Y-%m-%d %T "
export SUDO_ASKPASS="$HOME/.local/bin/scripts/dmenu/dmenupass"
export PIPENV_VENV_IN_PROJECT=1 # Force pipenv to create new environments within projects ./.venv
export XSECURELOCK_SHOW_HOSTNAME=0 # Don't show hostname in xsecurelock

View file

@ -35,6 +35,7 @@ SAVEHIST=10000
setopt appendhistory # save history entries as soon as they are entered
setopt hist_ignore_space # ignore commands that start with space
setopt hist_verify # show commands with history expansion to user before running it
setopt extended_history # record command start time
#setopt hist_ignore_dups # ignore duplicated commands history list
#setopt hist_expire_dups_first # delete duplicates first when HISTFILE size exceeds HISTFILE
#setopt share_history # share command history data between terminals