From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18591 invoked from network); 2 Sep 1999 08:29:27 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 2 Sep 1999 08:29:27 -0000 Received: (qmail 12366 invoked by alias); 2 Sep 1999 08:29:18 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7625 Received: (qmail 12359 invoked from network); 2 Sep 1999 08:29:17 -0000 Date: Thu, 2 Sep 1999 10:29:05 +0200 (MET DST) Message-Id: <199909020829.KAA01893@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Peter Stephenson's message of Wed, 01 Sep 1999 16:46:37 +0200 Subject: Re: PATCH: 3.1.6-pws-2: _gv Peter Stephenson wrote: > Some typos crept into _gv (at least the one I have, which is the one you > get). Oops. > Also, completion for configure failed when I used it via a path beginning > with a ~. Apparently something (_arguments, presumably) tried to append > the current directory to the path, which didn't work awfully well. Yep, the caching could be improved, but the problem here was that there were too many double quotes and a missing tilde (to have the tilde expanded). > (By the way, Sven, now I've thought of it: when you generate new completion > functions, could you use a directory name like Completion with a suffix > rather than oc for the old directory, since patch -p0 prefers the shorter > name and creates it in oc. If you want to avoid having to type the whole > of Completion..., I believe there are now shells which can help in this > respect...) Cool. Where can I get them? (And, yes, I can do that.) > *** Completion/User/_gv~ Mon Aug 30 16:18:56 1999 Why is this in `User', btw? ghostview without X doesn't seem to make much sense to me (ghostscript without X is ok, though). Bye Sven P.S.: I don't need the smiley, yes? diff -u Completion.old/Base/_arguments Completion/Base/_arguments --- Completion.old/Base/_arguments Wed Sep 1 14:24:49 1999 +++ Completion/Base/_arguments Thu Sep 2 10:27:12 1999 @@ -43,10 +43,9 @@ tmpargv=( "${(@)argv[1,nth-1]}" ) fi - if [[ "$words[1]" = /* ]]; then - tmp="$words[1]" - else - tmp="$PWD/$words[1]" + tmp=${~words[1]} + if [[ "$tmp" != /* ]]; then + tmp="$PWD/$tmp" fi if [[ "$tmp" != "$_args_cache_longcmd" ]]; then @@ -92,7 +91,7 @@ # those hyphens and anything from the space or comma after the # option up to the end. - lopts=("--${(@)^${(@)${(@)${(@M)${(@ps:\n:j:\n:)${(@)${(@M)${(@f)$("$words[1]" --help 2>&1)//\[--/ + lopts=("--${(@)^${(@)${(@)${(@M)${(@ps:\n:j:\n:)${(@)${(@M)${(@f)$(${~words[1]} --help 2>&1)//\[--/ --}:#[ ]#-*}//,/ }}:#[ ]#--*}#*--}%%[, ]*}:#}") -- Sven Wischnowsky wischnow@informatik.hu-berlin.de