From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: PATCH: _mutt, _mailboxes
Date: Fri, 17 Sep 1999 13:22:54 +0200 (MET DST) [thread overview]
Message-ID: <199909171122.NAA02395@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Sven Wischnowsky's message of Fri, 17 Sep 1999 11:04:42 +0200 (MET DST)
I wrote:
> Adam Spiers wrote:
>
> > Sven Wischnowsky (wischnow@informatik.hu-berlin.de) wrote:
> > > And while I'm at it... I'm the only one who writes option
> > > descriptions, it seems, which I can understand considering how tedious
> > > that is. So my question is: if an option gets only one argument,
> > > should we turn it's description automatically into the
> > > option-description? Probably prefixed by something like `specify: '?
> >
> > Sounds like a good idea. How about a configuration key which in this
> > case would be something like `specify: %s'?
>
> Yep. It's `autodescribe_options' (and the sequence is `%d', for
> `description').
Oops. We won't want that for undescribed long options. And not for
empty descriptions.
Bye
Sven
diff -u oldcompletion/Base/_arguments Completion/Base/_arguments
--- oldcompletion/Base/_arguments Fri Sep 17 11:07:34 1999
+++ Completion/Base/_arguments Fri Sep 17 13:20:38 1999
@@ -126,7 +126,7 @@
# Then we walk through the descriptions plus a few builtin ones.
set -- "$@" '*=FILE*:file:_files' \
- '*=(DIR|PATH)*:directory:_files -/' '*:unknown:'
+ '*=(DIR|PATH)*:directory:_files -/' '*: :'
while (( $# )); do
@@ -219,8 +219,8 @@
1="${1/\[$descr\]}"
elif [[ -n "$compconfig[autodescribe_options]" &&
"$1" = [-+][^:]##:[^:]#[^\\]:[^:]# ]]; then
- descr="${${(M)${1#*:}#*[^\\]:}[1,-2]}"
- descr="${compconfig[autodescribe_options]//\\%d/$descr}"
+ descr="${${${${(M)${1#*:}#*[^\\]:}[1,-2]}## #}%% #}"
+ [[ -n "$descr" ]] && descr="${compconfig[autodescribe_options]//\\%d/$descr}"
fi
# Description for both the `-foo' and `+foo' form?
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
next reply other threads:[~1999-09-17 11:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-09-17 11:22 Sven Wischnowsky [this message]
-- strict thread matches above, loose matches on Subject: below --
1999-09-17 9:04 Sven Wischnowsky
1999-09-16 13:11 Sven Wischnowsky
1999-09-16 15:38 ` Adam Spiers
1999-09-15 21:30 Clint Adams
1999-09-18 23:27 ` Bart Schaefer
1999-09-20 4:48 ` Clint Adams
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=199909171122.NAA02395@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).