Extract sourcing of bash completion helpers into a function
This commit is contained in:
parent
e6d06f00cb
commit
2b72adc543
1 changed files with 10 additions and 7 deletions
|
@ -280,6 +280,15 @@ bashrc_customize_ls() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bashrc_source_completion_helpers() {
|
||||||
|
if [ -d /usr/local/etc/bash_completion.d ]; then
|
||||||
|
local f
|
||||||
|
for f in /usr/local/etc/bash_completion.d/*; do
|
||||||
|
source "$f"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# Print the solarized palette (for testing)
|
# Print the solarized palette (for testing)
|
||||||
solarized() {
|
solarized() {
|
||||||
local names=(Base02 Red Green Yellow Blue Magenta Cyan Base2
|
local names=(Base02 Red Green Yellow Blue Magenta Cyan Base2
|
||||||
|
@ -336,13 +345,7 @@ bashrc_customize_aliases
|
||||||
bashrc_customize_terminal_colors
|
bashrc_customize_terminal_colors
|
||||||
bashrc_customize_prompt
|
bashrc_customize_prompt
|
||||||
bashrc_customize_ls
|
bashrc_customize_ls
|
||||||
|
bashrc_source_completion_helpers
|
||||||
# Source any available completion helpers
|
|
||||||
if [ -d /usr/local/etc/bash_completion.d ]; then
|
|
||||||
for f in /usr/local/etc/bash_completion.d/*; do
|
|
||||||
source "$f"
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Source a local bashrc if available
|
# Source a local bashrc if available
|
||||||
if [ -f "$HOME/.bashrc.local" ]; then
|
if [ -f "$HOME/.bashrc.local" ]; then
|
||||||
|
|
Loading…
Add table
Reference in a new issue