Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH _uscan update options
- X-seq: zsh-workers 54014
- From: Christopher Bock <christopher@xxxxxxxxx>
- To: Oliver Kiddle <opk@xxxxxxx>
- Cc: zsh-workers@xxxxxxx
- Subject: Re: PATCH _uscan update options
- Date: Fri, 31 Oct 2025 07:46:43 +0100
- Archived-at: <https://zsh.org/workers/54014>
- In-reply-to: <93437-1761421532.555109@uejQ.QTyX.Bh81>
- List-id: <zsh-workers.zsh.org>
- References: <20251025175551.58a04901@obelix.mag.magnix.de> <20251025181514.2d8be64a@obelix.mag.magnix.de> <93437-1761421532.555109@uejQ.QTyX.Bh81>
On Sat, 25 Oct 2025 21:45:32 +0200
Oliver Kiddle <opk@xxxxxxx> wrote:
> Christopher Bock wrote:
> > > After 20 years some things are bound to change :P
> > and of course i only see the problems after i send it /ö\
>
> Thanks for this.
>
> > '(--pasv --no-pasv)--no-pasv[do not use passive mode for ftp]' \
> > '(--symlink --no-symlink)--symlink[make orig.tar.gz symlinks]' \
>
> I'm commenting on an unchanged lines of context here so this is not
> something you're introducing. However, there's no need for an option
> to exclude itself. That happens by default and you need a * prefix for
> repeatable options.
>
> '(--symlink --no-symlink)--symlink[make orig.tar.gz symlinks]'
>
> Such explicit self-exclusions are harmless other than making the line
> longer and do often occur as a side-effect of using brace expansion
> where options have alternative names.
>
> > + '--timeout[specify request timeout (default 20)]:timeout:_numbers -u seconds' \
>
> Where there's a default, pass it to _numbers with the -d option and
> don't include it in the option description, e.g.
>
> '--timeout[specify request timeout]:timeout:_numbers -u seconds -d 20'
>
> This puts the default in the match heading and applies whatever
> formatting and attributes/colours have been configured.
>
> > + '(--download -d)'{--download,-d}'[download new upstream release(default)]' \
> > + '(--signature --no-signature --skip-signature)--signature[download signature and verify (default)]' \
> > + '(--dehs --no-dehs)--no-dehs[use traditional output (default)]' \
>
> It requires a certain amount of judgement about the particular case but
> usually, where options only assert the defaults, I avoid having them
> bloat out the completion option lists. It is still good to include them
> so that we know the option was not forgotten. Prefixing with ! does
> this. And you can even include the exclusion list, e.g:
>
> '!(--no-signature --skip-signature)--signature'
>
> Sometimes a command lets you can configure the defaults and if you think
> this is likely to be common you might choose not to do this.
>
> Oliver
>
Hi, Oliver
thanks for the hints. Just fyi, i will probably get around updating it this
weekend. Also accidentally removed the --no-download option when
resorting/cleaning it up..
Messages sorted by:
Reverse Date,
Date,
Thread,
Author