* PATCH: Re: completion of ~ directories broken?
@ 2000-04-25 10:58 Sven Wischnowsky
0 siblings, 0 replies; only message in thread
From: Sven Wischnowsky @ 2000-04-25 10:58 UTC (permalink / raw)
To: zsh-workers
Adam Spiers wrote:
> [latest CVS]
>
> % ls ~<TAB>
> _all_labels:comptags:23: no tags registered
>
> then it lists all users. It doesn't seem to complete named
> directories either, but maybe I'm just missing a zstyle command for
> that.
Thinko, sorry. The missing named directories were caused by the same
bug.
Bye
Sven
Index: Completion/Base/_tilde
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Base/_tilde,v
retrieving revision 1.2
diff -u -r1.2 _tilde
--- Completion/Base/_tilde 2000/04/01 20:43:43 1.2
+++ Completion/Base/_tilde 2000/04/25 10:57:33
@@ -18,6 +18,7 @@
while _tags; do
_requested users && _users "$suf[@]" "$@" && ret=0
+
_requested named-directories expl 'named directory' \
compadd "$suf[@]" "$@" - "${(@k)nameddirs}"
Index: Completion/Core/_all_labels
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Core/_all_labels,v
retrieving revision 1.2
diff -u -r1.2 _all_labels
--- Completion/Core/_all_labels 2000/04/11 07:57:56 1.2
+++ Completion/Core/_all_labels 2000/04/25 10:57:33
@@ -1,7 +1,12 @@
#autoload
-local gopt=-J len tmp pre suf ret=1 descr spec
+local gopt=-J len tmp pre suf ret=1 descr spec prev
+if [[ "$1" = - ]]; then
+ prev=-
+ shift
+fi
+
if [[ "$1" = -([12]|)[VJ] ]]; then
gopt="$1"
shift
@@ -20,7 +25,7 @@
suf=5
fi
-while comptags -A "$1" curtag spec; do
+while comptags "-A$prev" "$1" curtag spec; do
_comp_tags="$_comp_tags $spec "
if [[ "$curtag" = *:* ]]; then
zformat -f descr "${curtag#*:}" "d:$3"
Index: Completion/Core/_requested
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Core/_requested,v
retrieving revision 1.3
diff -u -r1.3 _requested
--- Completion/Core/_requested 2000/04/11 07:57:57 1.3
+++ Completion/Core/_requested 2000/04/25 10:57:33
@@ -9,7 +9,7 @@
if comptags -R "$1"; then
if [[ $# -gt 3 ]]; then
- _all_labels "$gopt" "$@"
+ _all_labels - "$gopt" "$@"
elif [[ $# -gt 1 ]]; then
_description "$gopt" "$@"
fi
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2000-04-25 10:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-04-25 10:58 PATCH: Re: completion of ~ directories broken? Sven Wischnowsky
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).