refactor(shell): nixify bash history config

This commit is contained in:
2026-08-23 13:32:24 +02:00
parent 31e2bae402
commit 86e780da0d
2 changed files with 16 additions and 7 deletions
-7
View File
@@ -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
+16
View File
@@ -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"