about summary refs log tree commit diff
path: root/Completion/Builtins
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2001-03-27 12:22:53 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2001-03-27 12:22:53 +0000
commitaa9c315cc872f86465a83dba3546ee62317297ba (patch)
tree4730b18268c7b3d5381c0a245054244cb41e46d8 /Completion/Builtins
parent6d72dca54fbbf3e86807502288ace649f5fbe05c (diff)
downloadzsh-aa9c315cc872f86465a83dba3546ee62317297ba.tar.gz
zsh-aa9c315cc872f86465a83dba3546ee62317297ba.tar.xz
zsh-aa9c315cc872f86465a83dba3546ee62317297ba.zip
comment out looking up the prefix-needed style when completing directory stack entries; make _tilde use _popd, finally (13789)
Diffstat (limited to 'Completion/Builtins')
-rw-r--r--Completion/Builtins/_popd18
1 files changed, 14 insertions, 4 deletions
diff --git a/Completion/Builtins/_popd b/Completion/Builtins/_popd
index f551bb299..f79aa947f 100644
--- a/Completion/Builtins/_popd
+++ b/Completion/Builtins/_popd
@@ -7,10 +7,20 @@
 
 setopt localoptions nonomatch
 
-local expl list lines revlines disp
+local expl list lines revlines disp suf
 
-! zstyle -T ":completion:${curcontext}:directory-stack" prefix-needed ||
-    [[ $PREFIX = [-+]* ]] || return 1
+if [[ "$SUFFIX" = */* ]]; then
+  ISUFFIX="/${SUFFIX#*/}$ISUFFIX"
+  SUFFIX="${SUFFIX%%/*}"
+  suf=(-S '')
+else
+  suf=(-qS/)
+fi
+
+### we decided against this, for now...
+#! zstyle -T ":completion:${curcontext}:directory-stack" prefix-needed ||
+
+[[ $PREFIX = [-+]* ]] || return 1
 
 if zstyle -T ":completion:${curcontext}:directory-stack" verbose; then
   # get the list of directories with their canonical number
@@ -38,4 +48,4 @@ else
 fi
 
 _wanted -V directory-stack expl 'directory stack' \
-    compadd "$@" "$disp[@]" -Q -a list
+    compadd "$@" "$suf[@]" "$disp[@]" -Q -a list