From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: PATCH: 3.1.6-pws-2: _gv
Date: Thu, 2 Sep 1999 10:29:05 +0200 (MET DST) [thread overview]
Message-ID: <199909020829.KAA01893@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Peter Stephenson's message of Wed, 01 Sep 1999 16:46:37 +0200
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
next reply other threads:[~1999-09-02 8:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-09-02 8:29 Sven Wischnowsky [this message]
-- strict thread matches above, loose matches on Subject: below --
1999-09-01 14:46 Peter Stephenson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=199909020829.KAA01893@beta.informatik.hu-berlin.de \
--to=wischnow@informatik.hu-berlin.de \
--cc=zsh-workers@sunsite.auc.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).