aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc.d
diff options
context:
space:
mode:
Diffstat (limited to 'bash/bashrc.d')
-rw-r--r--bash/bashrc.d/sd.bash3
1 files changed, 1 insertions, 2 deletions
diff --git a/bash/bashrc.d/sd.bash b/bash/bashrc.d/sd.bash
index 75f220d8..4a211f1d 100644
--- a/bash/bashrc.d/sd.bash
+++ b/bash/bashrc.d/sd.bash
@@ -119,7 +119,6 @@ _sd() {
# Build list of matching sibiling directories
while IFS= read -d '' -r dirname ; do
- [[ $dirname == "${COMP_WORDS[COMP_CWORD]}"* ]] || continue
COMPREPLY=("${COMPREPLY[@]}" "$dirname")
done < <(
@@ -129,7 +128,7 @@ _sd() {
# Collect directory names, exclude current directory, strip leading ../
# and trailing /
local -a dirnames
- dirnames=(../!("${PWD##*/}")/)
+ dirnames=(../"${COMP_WORDS[COMP_CWORD]}"*/)
dirnames=("${dirnames[@]#../}")
dirnames=("${dirnames[@]%/}")