diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2018-12-01 02:19:46 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2018-12-01 02:19:46 +1300 |
commit | 626593c3712531c251c69be2e561a34da98cdcdf (patch) | |
tree | 273665cf1dcc5953ae0f7c324576015def43d630 /bash/bash_completion.d/path.bash | |
parent | Use simpler method of no case completion check (diff) | |
download | dotfiles-626593c3712531c251c69be2e561a34da98cdcdf.tar.gz dotfiles-626593c3712531c251c69be2e561a34da98cdcdf.zip |
Remove null-result guard from completion gens
I don't believe these are needed anymore, or possibly ever were.
Diffstat (limited to 'bash/bash_completion.d/path.bash')
-rw-r--r-- | bash/bash_completion.d/path.bash | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/bash/bash_completion.d/path.bash b/bash/bash_completion.d/path.bash index da867880..fcb57949 100644 --- a/bash/bash_completion.d/path.bash +++ b/bash/bash_completion.d/path.bash @@ -41,14 +41,8 @@ _path() { dirnames=("${COMP_WORDS[COMP_CWORD]}"*/) dirnames=("${dirnames[@]%/}") - # Print quoted entries, null-delimited, if there was at - # least one; otherwise, just print a null character to stop - # this hanging in Bash 4.4 - if ((${#dirnames[@]})) ; then - printf '%q\0' "${dirnames[@]}" - else - printf '\0' - fi + # Print quoted entries, null-delimited + printf '%q\0' "${dirnames[@]}" ) ;; |