Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
qnd:bash_configuration [2023/01/11 14:45] – mgupton | qnd:bash_configuration [2023/03/31 11:34] (current) – mgupton | ||
---|---|---|---|
Line 8: | Line 8: | ||
# | # | ||
shopt -s histverify | shopt -s histverify | ||
- | export HISTIGNORE=" | + | # Exclude things from being saved in history |
+ | export HISTIGNORE=" | ||
# Prevent duplicate entries | # Prevent duplicate entries | ||
export HISTCONTROL=ignoreboth: | export HISTCONTROL=ignoreboth: | ||
Line 15: | Line 16: | ||
# Add date-time stamp for commands in history output | # Add date-time stamp for commands in history output | ||
export HISTTIMEFORMAT=" | export HISTTIMEFORMAT=" | ||
+ | # | ||
+ | # Add current line to history without executing it. | ||
+ | # | ||
+ | bind '" | ||
# | # | ||
Line 33: | Line 38: | ||
alias hg=' | alias hg=' | ||
alias nn=' | alias nn=' | ||
+ | alias ha=' | ||
+ | alias hs=' | ||
</ | </ | ||
Line 39: | Line 46: | ||
# Handle saving history with multiple shells | # Handle saving history with multiple shells | ||
# After each command, append to the history file and reread it | # After each command, append to the history file and reread it | ||
+ | # Ref: https:// | ||
PROMPT_COMMAND=" | PROMPT_COMMAND=" | ||
</ | </ |