Created
March 21, 2018 10:02
-
-
Save jan-warchol/4a018fcc8a9f4f2ac8632093339fc885 to your computer and use it in GitHub Desktop.
Miscellaneous bash history settings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# enable keeping history timestamps and set display format to ISO-8601 | |
export HISTTIMEFORMAT="%F %T " | |
# ignore duplicates and commands starting with space | |
HISTCONTROL=ignoreboth | |
# ignore specific commands (full-length match) | |
HISTIGNORE=”?:cd:ls:ll:bg:fg:vim:git status” | |
# disable terminal flow control key binding, so that ^S will search history forward | |
stty -ixon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# make Ctrl-up/down search history for commands starting with currently | |
# typed prefix (unlike Ctrl-R/S, which searches entire command string). | |
"\e[1;5A":history-search-backward | |
"\e[1;5B":history-search-forward | |
"\e[5A": history-search-backward | |
"\e[5B": history-search-forward | |
"\e\e[A": history-search-backward | |
"\e\e[B": history-search-forward | |
# Also bind this to up and down arrow | |
"\e[1;A":history-search-backward | |
"\e[1;B":history-search-forward | |
"\e[A": history-search-backward | |
"\e[B": history-search-forward |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment