bash: load completions

This commit is contained in:
Vladan Popovic 2024-10-06 04:58:36 +02:00
parent 9bb7d51331
commit 8195f975be

View file

@ -15,6 +15,15 @@ shopt -s histappend
[[ -f $HOME/.bash_colors ]] && source "$HOME/.bash_colors"
[[ -f $HOME/.bash_functions ]] && source "$HOME/.bash_functions"
if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
elif [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
fi
while read -r completion ; do source "$completion" ; done < <(find $HOME/.bash_completion/ -maxdepth 1 -not -type d)
# Save working dir on every prompt.
export PROMPT_COMMAND='pwd > $HOME/.cwd'
export PS1="${Yellow}\d \A ${Off}${Green}\u@\h: ${Off}\w ${Red}\$(parse_branch git)${BRed}\$(parse_branch fossil)${Off}\n-$ "