summaryrefslogtreecommitdiff
path: root/bin/load-bash-autocomplete
blob: 53c50fbbb086f3eeedffdfe30a8cb106eca53581 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/bash
if [ -f ~/.bash_completion ]; then
    cat .bash_completion | while read LINE
    do
        grep -q "$LINE" ~/.bash_completion || {
            echo "$LINE" >> ~/.bash_completion
            echo 'added "'$LINE'" to .bash_completion, reload your shell to use auto-complete'
        }
    done
else
    cp .bash_completion ~/.bash_completion
fi