Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH _uscan update options
- X-seq: zsh-workers 54026
- From: Christopher Bock <christopher@xxxxxxxxx>
- To: Oliver Kiddle <opk@xxxxxxx>
- Cc: zsh-workers@xxxxxxx
- Subject: Re: PATCH _uscan update options
- Date: Tue, 4 Nov 2025 05:35:45 +0100
- Archived-at: <https://zsh.org/workers/54026>
- 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>
Hey,
i revised the whole file again and also took a closer look into uscan(1).
Hope i didn't forget anything and fixed all typos.
On Sat, 25 Oct 2025 21:45:32 +0200
Oliver Kiddle <opk@xxxxxxx> wrote:
> > '(--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.
If i understood you correctly you meant this which i now also applied so far
i think it fits with all the if's and not anymore from the man...
'(--no-symlink)--symlink[make orig.tar.gz symlinks]'
Will also ask in #desvscripts@OFTC if someone might have a look at this
thread to make sure.
>
> > + '(--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.
I thought about it but think it would be helpful to still allow using those
w/o any additional configuration-parsing where someone might have changed
their defaults but want to use the completion to change them back here and
there.
There are also two options where i have no clue how to accomplish those rules
but we could probably live w/o those :-).
https://manpages.debian.org/unstable/devscripts/uscan.1.en.html#conffile
> --conffile, --conf-file
> Add or replace default configuration files ("/etc/devscripts.conf" and
> "~/.devscripts"). This can only be used as the first option given on the
> command-line.>
> replace:
> uscan --conf-file test.conf --verbose
> add:
> uscan --conf-file +test.conf --verbose
> If one --conf-file has no "+", default configuration files are ignored.
https://manpages.debian.org/unstable/devscripts/uscan.1.en.html#package
> Specify the name of the package to check for rather than examining
> debian/changelog; this requires the --upstream-version (unless a version is
> specified in the watch file) and --watchfile options as well. Furthermore,
> no directory scanning will be done and nothing will be downloaded. This
> option automatically sets --no-download and --skip-signature; and probably
> most useful in conjunction with the DEHS system (and --dehs).
---
Completion/Debian/Command/_uscan | 50 ++++++++++++++++++++++++--------
1 file changed, 38 insertions(+), 12 deletions(-)
diff --git a/Completion/Debian/Command/_uscan
b/Completion/Debian/Command/_uscan index 699d5c34c..0ec169397 100644
--- a/Completion/Debian/Command/_uscan
+++ b/Completion/Debian/Command/_uscan
@@ -1,17 +1,43 @@
#compdef uscan
_arguments \
- '(--report --no-download --download)'{--report,--no-download}'[report but
do not download]' \
- '--debug[dump downloaded pages to stdout]' \
- '(--report --no-download --download)--download[report and download]' \
- '(--pasv --no-pasv)--pasv[force passive mode for ftp]' \
- '(--pasv --no-pasv)--no-pasv[do not use passive mode for ftp]' \
- '(--symlink --no-symlink)--symlink[make orig.tar.gz symlinks]' \
- '(--symlink --no-symlink)--no-symlink[do not make orig.tar.gz symlinks]' \
- '(--verbose --no-verbose)--verbose[give verbose output]' \
- '(--verbose --no-verbose)--no-verbose[do not give verbose output]' \
+ '(--conffile --conf-file)'{--conffile,--conf-file}'[add or replace default
configuration file]: :_files' \
+ '(--no-conf --noconf)'{--no-conf,--noconf}'[do not read any configuration
files]' \
+ '(--verbose)--no-verbose[do not give verbose output]' \
+ '(--verbose -v --no-verbose)'{--verbose,-v}'[give verbose output]' \
+ '(--debug -vv)'{--debug,-vv}'[dump downloaded pages to stdout]' \
+ '(--extra-debug -vvv)'{--extra-debug,-vvv}'[also report remote content
during "search" step]' \
+ '(--no-dehs)--dehs[send dehs output(xml) to stdout and other output to
stderr]' \
+ '(--dehs)--no-dehs[use traditional output (default)]' \
+ '(--download -d)'{--download,-d}'[download new upstream release(default)]'
\
+ '(--force-download -dd)'{--force-download,-dd}'[download new upstream even
is up-to-date w/o overwrite]' \
+ '(--overwrite-download -ddd)'{--overwrite-download,-ddd}'[download new
upstream even is up-to-date and overwrite]' \
+ '(--no-download --nodownload --skip-signature --report
--safe)'{--report,--safe}'[report but do not download]' \
+ '(--no-signature --skip-signature)--signature[download signature and
verify (default)]' \
+ '(--signature --skip-signature)--no-signature[do not download signature
but verify]' \
+ '(--signature --no-signature)--skip-signature[do not bother download
signature nor verify]' \
+ '(--safe --verbose)--report-status[equivalent of setting --verbose
--safe]' \
+ '(--no-download --nodownload)'{--no-download,--nodownload}'[do not
download and report information]' \
+ '--download-version[specify upstream version to match]:version' \
+ '--download-debversion[specify debian package version to match the
release]:debversion' \
+ '--download-current-version[download currently packaged version]' \
'--check-dirname-level:level:((0\:never\ check\ the\ directory\ name
1\:only\ check\ directory\ name\ if\ we\ had\ to\ change\ directory
2\:always\ check\ the\ directory\ name))' \ '--check-dirname-regex:perl
regex' \
- '(--no-conf --noconf)'{--no-conf,--noconf}'[do not read any configuration
files]' \
- '--help[display help information]' \
- '--version[display version information]'
+ '--destdir[path to download to]: :_files -/' \
+ '--package[specify package name]:package' \
+ '--upstream-version[specify upstream version to match]:version' \
+ '--watchfile[specify watch file]:watchfile:_files' \
+ '--bare[disable site specific redirects]' \
+ '--http-header[add spcified header to request]:http-header' \
+ '--no-exclusion[disable automatic exclusion of files]' \
+ '(--symlink --no-symlink)--no-symlink[do not rename nor repack upstream
tarball]' \
+ '--timeout[specify request timeout]:timeout:_numbers -u seconds -d 20' \
+ '(--user-agent --useragent)'{--user-agent,--useragent}'[override default
user agent]:useragent' \
+ '--log[record md5sum changes]' \
+ '(: -)--help[display help information]' \
+ '(: -)--version[display version information]' \
+ '(--symlink --no-symlink)--symlink[make orig.tar.gz symlinks]' \
+ '--rename[instead of symlinking do rename downloaded files]' \
+ '--repack[after download repack to specified compression]' \
+ '--compression[choose repack compression]:compression:((gzip bzip2 lzma xz
default))' \
+ '--copyright-file[exclude files mentioned in copyright-file]'
--
2.51.0
Messages sorted by:
Reverse Date,
Date,
Thread,
Author