diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-30 14:43:33 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-30 14:51:41 +1200 |
commit | 95c3c2daf1e63f02a37db0e003f01da788acfb7d (patch) | |
tree | 8d477a9d48f58b8100b34892478bdce619db4ee4 /bash/bash_completion.d/bd.bash | |
parent | Note broken mysql() (diff) | |
download | dotfiles-95c3c2daf1e63f02a37db0e003f01da788acfb7d.tar.gz dotfiles-95c3c2daf1e63f02a37db0e003f01da788acfb7d.zip |
Handle empty filename completions better
Bash 4.4 hangs in an awkward way (probably outputting the literal null
char in some unexpected context) without this; I'm not sure if this is a
bug or whether it's just been tolerated behaviour until now.
Diffstat (limited to 'bash/bash_completion.d/bd.bash')
-rw-r--r-- | bash/bash_completion.d/bd.bash | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bash/bash_completion.d/bd.bash b/bash/bash_completion.d/bd.bash index 4b3d4a94..86146a4e 100644 --- a/bash/bash_completion.d/bd.bash +++ b/bash/bash_completion.d/bd.bash @@ -16,7 +16,7 @@ _bd() { local dirname for dirname in "${dirnames[@]}" ; do [[ $dirname == "${COMP_WORDS[COMP_CWORD]}"* ]] || continue - COMPREPLY=("${COMPREPLY[@]}" "$(printf %q "$dirname")") + COMPREPLY[${#COMPREPLY[@]}]=$(printf %q "$dirname") done } complete -F _bd bd |