From 626593c3712531c251c69be2e561a34da98cdcdf Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 1 Dec 2018 02:19:46 +1300 Subject: Remove null-result guard from completion gens I don't believe these are needed anymore, or possibly ever were. --- bash/bash_completion.d/sd.bash | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'bash/bash_completion.d/sd.bash') diff --git a/bash/bash_completion.d/sd.bash b/bash/bash_completion.d/sd.bash index 9694de1f..2d2d8f22 100644 --- a/bash/bash_completion.d/sd.bash +++ b/bash/bash_completion.d/sd.bash @@ -41,14 +41,8 @@ _sd() { sibs[${#sibs[@]}]=$dirname done - # Print quoted sibs, null-delimited, if there was at least one; - # otherwise, just print a null character to stop this hanging in Bash - # 4.4 - if ((${#sibs[@]})) ; then - printf '%q\0' "${sibs[@]}" - else - printf '\0' - fi + # Print quoted sibling directories, null-delimited + printf '%q\0' "${sibs[@]}" ) } complete -F _sd sd -- cgit v1.2.3