about summary refs log tree commit diff
path: root/Functions
diff options
context:
space:
mode:
authorPeter Stephenson <p.stephenson@samsung.com>2021-01-27 11:16:55 +0000
committerPeter Stephenson <p.stephenson@samsung.com>2021-01-27 11:16:55 +0000
commit8f42ecd8eecd848ac5a1efdff9d7db15cc89422f (patch)
tree386736f932817fb409db2c36f8c61c52c6549f62 /Functions
parent5d14b6eb71b51911a1083b1c5882f3b3307e9d1b (diff)
downloadzsh-8f42ecd8eecd848ac5a1efdff9d7db15cc89422f.tar.gz
zsh-8f42ecd8eecd848ac5a1efdff9d7db15cc89422f.tar.xz
zsh-8f42ecd8eecd848ac5a1efdff9d7db15cc89422f.zip
47873: Improve completion within dynamic directory names
Diffstat (limited to 'Functions')
-rw-r--r--Functions/Chpwd/zsh_directory_name_cdr4
1 files changed, 3 insertions, 1 deletions
diff --git a/Functions/Chpwd/zsh_directory_name_cdr b/Functions/Chpwd/zsh_directory_name_cdr
index cb72e4600..b653e7c38 100644
--- a/Functions/Chpwd/zsh_directory_name_cdr
+++ b/Functions/Chpwd/zsh_directory_name_cdr
@@ -16,8 +16,10 @@ elif [[ $1 = c ]]; then
     typeset -a keys values
     values=(${${(f)"$(cdr -l)"}/ ##/:})
     keys=(${values%%:*})
+    local addsuffix
+    [[ $ISUFFIX = *\]* ]] || addsuffix='-S]'
     _describe -t dir-index 'recent directory index' \
-      values -V unsorted -S']'
+      values -V unsorted $addsuffix
     return
   fi
 fi