From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11608 invoked from network); 23 Mar 2000 11:49:19 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 23 Mar 2000 11:49:19 -0000 Received: (qmail 1352 invoked by alias); 23 Mar 2000 11:49:09 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10214 Received: (qmail 1327 invoked from network); 23 Mar 2000 11:49:06 -0000 Date: Thu, 23 Mar 2000 12:49:04 +0100 (MET) Message-Id: <200003231149.MAA23456@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: "Andrej Borsenkow"'s message of Thu, 23 Mar 2000 13:59:33 +0300 Subject: PATCH: RE: Something strange with matcher 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