diff options
Diffstat (limited to 'bash/bash_completion.d/bd.bash')
-rw-r--r-- | bash/bash_completion.d/bd.bash | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bash/bash_completion.d/bd.bash b/bash/bash_completion.d/bd.bash index 120080c3..e67cdd09 100644 --- a/bash/bash_completion.d/bd.bash +++ b/bash/bash_completion.d/bd.bash @@ -2,14 +2,14 @@ _bd() { # Only makes sense for the first argument - ((COMP_CWORD == 1)) || return 1 + ((COMP_CWORD == 1)) || return # Build a list of dirnames in $PWD local -a dirnames IFS=/ read -rd '' -a dirnames < <(printf '%s\0' "${PWD#/}") # Remove the last element in the array (the current directory) - ((${#dirnames[@]})) || return 1 + ((${#dirnames[@]})) || return dirnames=("${dirnames[@]:0:${#dirnames[@]}-1}") # Add the matching dirnames to the reply |