SwordArMor-gentoo-overlay/app-shells/bash/files/bashrc-r1
Alarig Le Lay 6e5832c851
app-shells/bash: new package, add 5.2_p26-r6
Signed-off-by: Alarig Le Lay <alarig@swordarmor.fr>
2024-07-01 14:05:20 +02:00

33 lines
862 B
Plaintext

# /etc/bash/bashrc
# Proceed no further in the case of a non-interactive shell.
if [[ $- != *i* ]]; then
return
fi
# A convenient function to determine whether bash has readline support.
genfun_has_readline() [[ $(shopt -p direxpand 2>/dev/null) ]]
# The following two shell options require for bash to have readline support.
genfun_has_readline &&
# Disable completion when the input buffer is empty.
shopt -s no_empty_cmd_completion &&
# Append to HISTFILE rather than overwrite upon exiting, per bug #139609.
shopt -s histappend
# Initialise PROMPT_COMMAND as an array, which is permitted as of bash 5.1.
PROMPT_COMMAND=()
# Don't let the user influence the order of sourcing for bash 5.3 or greater.
unset -v GLOBSORT
for _ in /etc/bash/bashrc.d/*; do
if [[ $_ == *.@(bash|sh) && -r $_ ]]; then
source "$_"
fi
done
unset -f genfun_has_readline