bash: load completions
This commit is contained in:
parent
9bb7d51331
commit
8195f975be
1 changed files with 9 additions and 0 deletions
|
@ -15,6 +15,15 @@ shopt -s histappend
|
||||||
[[ -f $HOME/.bash_colors ]] && source "$HOME/.bash_colors"
|
[[ -f $HOME/.bash_colors ]] && source "$HOME/.bash_colors"
|
||||||
[[ -f $HOME/.bash_functions ]] && source "$HOME/.bash_functions"
|
[[ -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.
|
# Save working dir on every prompt.
|
||||||
export PROMPT_COMMAND='pwd > $HOME/.cwd'
|
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-$ "
|
export PS1="${Yellow}\d \A ${Off}${Green}\u@\h: ${Off}\w ${Red}\$(parse_branch git)${BRed}\$(parse_branch fossil)${Off}\n-$ "
|
||||||
|
|
Loading…
Reference in a new issue