mirror of
				https://github.com/ItsDrike/dotfiles.git
				synced 2025-10-30 23:56:35 +00:00 
			
		
		
		
	Store timestamps in command history
This commit is contained in:
		
							parent
							
								
									f4d3da10ee
								
							
						
					
					
						commit
						fcdd9df1a6
					
				
					 3 changed files with 3 additions and 0 deletions
				
			
		|  | @ -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 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 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 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 user is not root, pass all commands via sudo/doas | ||||||
| if [ "$(id -u)" -ne 0 ]; then | if [ "$(id -u)" -ne 0 ]; then | ||||||
|  |  | ||||||
|  | @ -63,6 +63,7 @@ else | ||||||
| fi | fi | ||||||
| 
 | 
 | ||||||
| # Other program settings | # Other program settings | ||||||
|  | export HISTTIMEFORMAT="%Y-%m-%d %T " | ||||||
| export SUDO_ASKPASS="$HOME/.local/bin/scripts/dmenu/dmenupass" | 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 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 | export XSECURELOCK_SHOW_HOSTNAME=0      # Don't show hostname in xsecurelock | ||||||
|  |  | ||||||
|  | @ -35,6 +35,7 @@ SAVEHIST=10000 | ||||||
| setopt appendhistory			# save history entries as soon as they are entered | setopt appendhistory			# save history entries as soon as they are entered | ||||||
| setopt hist_ignore_space        # ignore commands that start with space | setopt hist_ignore_space        # ignore commands that start with space | ||||||
| setopt hist_verify              # show commands with history expansion to user before running it | 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_ignore_dups        # ignore duplicated commands history list | ||||||
| #setopt hist_expire_dups_first  # delete duplicates first when HISTFILE size exceeds HISTFILE | #setopt hist_expire_dups_first  # delete duplicates first when HISTFILE size exceeds HISTFILE | ||||||
| #setopt share_history           # share command history data between terminals | #setopt share_history           # share command history data between terminals | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue