* PATCH: RE: Something strange with matcher
@ 2000-03-23 11:49 Sven Wischnowsky
0 siblings, 0 replies; only message in thread
From: Sven Wischnowsky @ 2000-03-23 11:49 UTC (permalink / raw)
To: zsh-workers
Andrej Borsenkow wrote:
> > > Funnily, matcher for cd still works so I suspect now `files' tag is
> > > treated differently?
> >
> > Yes, cleaner. Actually, I'm a bit suprised that it worked
> > before, that
> > wasn't really planned.
> >
> > Anyway, as _complete_help could have told you:
> >
>
> Ahem ... but I did try complete help
>
> bor@itsrm2% l
> tags in context :completion::complete:ls::
> files (_default)
> all-files (_files _default)
;-) I know the output. But I also knew that _default doesn't look up
the styles (i.e. it doesn't call _description).
Latter tags take precedence over earlier ones, so to say.
For this case, the fix would be easy, but I'm sure that they are other
places in the completion system where this would then have to be
changed. Too many places to make it seem worthwhile to try...
Anyway, this made me notice that I had overlooked some direct calls to
_path_files, which now need the tag-alias-loop.
Bye
Sven
diff -ru ../z.old/Completion/Builtins/_cd Completion/Builtins/_cd
--- ../z.old/Completion/Builtins/_cd Thu Mar 23 10:44:29 2000
+++ Completion/Builtins/_cd Thu Mar 23 12:37:32 2000
@@ -34,7 +34,7 @@
if [[ -o cdablevars && -n "$PREFIX" && ! -d ${tdir::=${PREFIX%%/*}} &&
-d ${~tdir2::="~$tdir"} ]]; then
PREFIX="~$PREFIX"
- _path_files -/
+ _wanted directories expl directory _path_files -/
else
local tmpcdpath
tmpcdpath=(${(@)cdpath:#.})
@@ -43,5 +43,5 @@
"path-directories:directories in cdpath:_path_files -W tmpcdpath -/"
fi
else
- _path_files -/
+ _wanted directories expl directory _path_files -/
fi
diff -ru ../z.old/Completion/Builtins/_zstyle Completion/Builtins/_zstyle
--- ../z.old/Completion/Builtins/_zstyle Thu Mar 23 10:44:32 2000
+++ Completion/Builtins/_zstyle Thu Mar 23 12:39:26 2000
@@ -47,7 +47,7 @@
numbers c:bool
original c:bool
packageset c:packageset
- path 'c:_path_files -/'
+ path 'c:_wanted directories expl directory _path_files -/'
ports c:_ports
prefer-ignored c:bool
prefix-hidden c:bool
diff -ru ../z.old/Completion/User/_pbm Completion/User/_pbm
--- ../z.old/Completion/User/_pbm Thu Mar 23 10:44:42 2000
+++ Completion/User/_pbm Thu Mar 23 12:46:50 2000
@@ -17,11 +17,8 @@
fi
if [[ $# -ne 0 || $+_in_pbm -ne 0 ]]; then
- if (( ! $# )); then
- _description files expl 'picture file'
- set -- "$expl[@]"
- fi
- _path_files "$@" -g "$pat" || _files "$@" -g '*.(#i)p[bgp]m'
+ _wanted files expl 'picture file' _path_files "$@" -g "$pat" - ||
+ _files "$@" "$expl[@]" -g '*.(#i)p[bgp]m'
return
fi
@@ -772,6 +769,6 @@
;;
*)
- _description files expl 'picture file'
- _path_files "$expl[@]" -g "$pat" || _files "$expl[@]" -g '*.(#i)p[bgp]m'
+ _wanted files expl 'picture file' _path_files -g "$pat" ||
+ _files "$expl[@]" -g '*.(#i)p[bgp]m'
esac
diff -ru ../z.old/Completion/User/_pspdf Completion/User/_pspdf
--- ../z.old/Completion/User/_pspdf Thu Mar 23 10:44:43 2000
+++ Completion/User/_pspdf Thu Mar 23 12:45:32 2000
@@ -6,7 +6,6 @@
# gs gsbj gsdj gsdj500 gslj gslp gsnd ps2ascii
_ps && ret=0
-_description files expl 'PDF file'
-_path_files "$expl[@]" -g '*.(#i)pdf'
+_wanted files expl 'PDF file' _path_files -g '*.(#i)pdf'
return ret
diff -ru ../z.old/Completion/User/_tiff Completion/User/_tiff
--- ../z.old/Completion/User/_tiff Thu Mar 23 10:44:44 2000
+++ Completion/User/_tiff Thu Mar 23 12:46:48 2000
@@ -13,7 +13,8 @@
_description files expl 'picture file'
set -- "$expl[@]"
fi
- _path_files "$@" -g "$pat" || _files "$@" -g '*.(#i)tiff'
+ _wanted files expl 'picture file' _path_files "$@" -g "$pat" - ||
+ _files "$@" "$expl[@]" -g '*.(#i)tiff'
return
fi
diff -ru ../z.old/Completion/User/_zdump Completion/User/_zdump
--- ../z.old/Completion/User/_zdump Thu Mar 23 10:44:45 2000
+++ Completion/User/_zdump Thu Mar 23 12:47:43 2000
@@ -6,4 +6,4 @@
_arguments '-v[lowest possible]' \
'-c[cutoff]:cutoff year:' \
- '*:timezone:_path_files -W $_zoneinfo_dirs'
+ '*:timezone:_files -W _zoneinfo_dirs'
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2000-03-23 11:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-03-23 11:49 PATCH: RE: Something strange with matcher 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).