diff options
Diffstat (limited to 'recipes/bash-completion/files')
-rw-r--r-- | recipes/bash-completion/files/bash_completion.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/recipes/bash-completion/files/bash_completion.sh b/recipes/bash-completion/files/bash_completion.sh new file mode 100644 index 0000000000..09715211c0 --- /dev/null +++ b/recipes/bash-completion/files/bash_completion.sh @@ -0,0 +1,12 @@ +# check for bash +[ -z "$BASH_VERSION" ] && return + +bash=${BASH_VERSION%.*}; bmajor=${bash%.*}; bminor=${bash#*.} +if [ "$PS1" ] && [ $bmajor -eq 2 ] && [ $bminor '>' 04 ] \ + && [ -f /etc/bash_completion ]; then # interactive shell + # Source completion code + . /etc/bash_completion +fi + +unset bash bmajor bminor + |