diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-21 21:09:15 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-21 21:25:15 +1200 |
commit | 7ddb8084297c5bf30db73e9b9058d71f52991901 (patch) | |
tree | 8b07077307ae6209d9e094270dbcc65b5e7e80c7 /bash/bashrc.d/completion.bash | |
parent | Restructure ed() to test,cache features on login (diff) | |
download | dotfiles-7ddb8084297c5bf30db73e9b9058d71f52991901.tar.gz dotfiles-7ddb8084297c5bf30db73e9b9058d71f52991901.zip |
Many stylistic fixes/optimisations
In particular, limit the verbose >=2.05 test to just one file: .bashrc
Diffstat (limited to 'bash/bashrc.d/completion.bash')
-rw-r--r-- | bash/bashrc.d/completion.bash | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/bash/bashrc.d/completion.bash b/bash/bashrc.d/completion.bash index c120878d..1246ba31 100644 --- a/bash/bashrc.d/completion.bash +++ b/bash/bashrc.d/completion.bash @@ -40,8 +40,11 @@ complete -A function -A variable unset # If we have dynamic completion loading (Bash>=4.0), use it if ((BASH_VERSINFO[0] >= 4)) ; then + + # Handler tries to load appropriate completion for commands _completion_loader() { [[ -n $1 ]] || return + local compspec compspec=$HOME/.bash_completion.d/$1.bash [[ -f $compspec ]] || return source "$compspec" >/dev/null 2>&1 && return 124 |