refactor(shell): nixify bash history config
This commit is contained in:
@@ -30,13 +30,6 @@ done
|
|||||||
[ -f "$HOME/.bashrc.d/prompt" ] && . "$HOME/.bashrc.d/prompt"
|
[ -f "$HOME/.bashrc.d/prompt" ] && . "$HOME/.bashrc.d/prompt"
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
# History {{{
|
|
||||||
export HISTSIZE=999999
|
|
||||||
export HISTFILESIZE= # Unlimited
|
|
||||||
export HISTCONTROL=ignoreboth:erasedups
|
|
||||||
export HISTIGNORE=" *:clear:l:ls:cd" # Omit commands from history (e.g. those prepended with space)
|
|
||||||
# }}}
|
|
||||||
|
|
||||||
# Man pages {{{
|
# Man pages {{{
|
||||||
# See `:h :Man` in NeoVim
|
# See `:h :Man` in NeoVim
|
||||||
export MANWIDTH=80
|
export MANWIDTH=80
|
||||||
|
|||||||
@@ -37,6 +37,22 @@ in
|
|||||||
programs.bash = {
|
programs.bash = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableCompletion = true;
|
enableCompletion = true;
|
||||||
|
|
||||||
|
historySize = 999999;
|
||||||
|
historyFileSize = -1; # unlimited
|
||||||
|
historyControl = [
|
||||||
|
"ignoreboth"
|
||||||
|
"erasedups"
|
||||||
|
];
|
||||||
|
# omit commands from history (e.g. those prepended with space)
|
||||||
|
historyIgnore = [
|
||||||
|
" *"
|
||||||
|
"clear"
|
||||||
|
"l"
|
||||||
|
"ls"
|
||||||
|
"cd"
|
||||||
|
];
|
||||||
|
|
||||||
initExtra = ''
|
initExtra = ''
|
||||||
for f in /home/${username}/.bashrc.d/*; do
|
for f in /home/${username}/.bashrc.d/*; do
|
||||||
[ -f "$f" ] && source "$f"
|
[ -f "$f" ] && source "$f"
|
||||||
|
|||||||
Reference in New Issue
Block a user