Files
config-bash/rc.d/history
T
xavier 6a53ee36fd chore(rc,profile,aliases,completion,libs,functions): Remove shebangs from sourced files
These files are always sourced (never executed directly), so the
#!/bin/bash shebang is inert and misleading. Drop it consistently
across rc.d/*, profile.d/*, and aliases.d/*.
2026-08-22 00:52:02 +02:00

49 lines
1003 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Customize shell history search
# Indicate your preference order for history tools
# The first one found available will be used
MY_HISTORY_TOOLS="atuin mcfly"
for tool in ${MY_HISTORY_TOOLS}; do
if (command -v "${tool}" &>/dev/null); then
USE_HISTORY_TOOL="${tool}"
break
fi
done
case "${USE_HISTORY_TOOL}" in
# https://atuin.sh/
"atuin")
if (command -v atuin &>/dev/null); then
eval "$(atuin init bash)"
else
echo "${USE_HISTORY_TOOL} command not found"
fi
;;
# https://github.com/cantino/mcfly
"mcfly")
if (command -v mcfly &>/dev/null); then
export MCFLY_PROMPT=" "
export MCFLY_INTERFACE_VIEW=BOTTOM
export MCFLY_RESULTS=50
export MCFLY_RESULTS_SORT=LAST_RUN
# export MCFLY_KEY_SCHEME=vim
export MCFLY_FUZZY=3
eval "$(mcfly init bash)"
else
echo "${USE_HISTORY_TOOL} command not found"
fi
;;
*)
# Default sane bash history behavior
export HISTCONTROL=ignoreboth:erasedups
export HISTSIZE=10000
export HISTFILESIZE=20000
shopt -s histappend
;;
esac