Add missing '-k' flag completion and cleanup code

This commit is contained in:
Shohei YOSHIDA 2026-02-17 13:55:42 +09:00
parent 8d93e4c1ee
commit a5f0a52034
No known key found for this signature in database
GPG Key ID: C9A1BB11BB940CF2
1 changed files with 16 additions and 23 deletions

View File

@ -28,7 +28,7 @@
# Description # Description
# ----------- # -----------
# #
# Completion script for dget 2.22.2 # Completion script for dget 2.25.19
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Authors # Authors
@ -39,28 +39,21 @@
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
_dget() { _arguments -A "-*" \
local context state line expl '(- *)'{-h,--help}'[Show help message]' \
local -A opt_args '(- *)'{-v,--version}'[Print license, copyright, and version information and exit]' \
'(-a --all)'{-a,--all}'[Package is a source package; download all binary packages]' \
_arguments -A "-*" \ '(--no-conf -b --backup)'{-b,--backup}'[Move files that would be overwritten to ./backup]' \
'(- *)'{-h,--help}'[Show help message]' \ '(--no-conf -q --quiet)'{-q,--quiet}'[Suppress wget/curl output]' \
'(- *)'{-v,--version}'[Print license, copyright, and version information and exit]' \ '(--no-conf -x --extract -d --download-only --build)'{-d,--download-only}'[Do not extract downloaded source]' \
'(-a --all)'{-a,--all}'[Package is a source package; download all binary packages]' \ '(--no-conf -x --extract -d --download-only --build)'{-x,--extract}'[Unpack downloaded source]' \
'(--no-conf -b --backup)'{-b,--backup}'[Move files that would be overwritten to ./backup]' \ '(--no-conf -u --allow-unauthenticated)'{-u,--allow-unauthenticated}'[Make no attempt to verify source package signature]' \
'(--no-conf -q --quiet)'{-q,--quiet}'[Suppress wget/curl output]' \ '(--no-conf -x --extract -d --download-only --build)--build[Build package with dpkg-buildpackage after download]' \
'(--no-conf -x --extract -d --download-only --build)'{-d,--download-only}'[Do not extract downloaded source]' \ '(--no-conf)--path[Check this directory in addition to the apt archive]:DIR:_files -/' \
'(--no-conf -x --extract -d --download-only --build)'{-x,--extract}'[Unpack downloaded source]' \ '(--no-conf -k --insecure)'{-k,--insecure}'[Do not check SSL certificates when downloading]' \
'(--no-conf -u --allow-unauthenticated)'{-u,--allow-unauthenticated}'[Make no attempt to verify source package signature]' \ '(--no-conf --no-cache)--no-cache[Disable server-side HTTP cache]' \
'(--no-conf -x --extract -d --download-only --build)--build[Build package with dpkg-buildpackage after download]' \ "(--no-conf)--no-conf[Don't read devscripts config files]" \
'(--no-conf)--path[Check this directory in addition to the apt archive]:DIR:_files -/' \ '(-)*:debian package or URL: _alternative "_deb_packages available" "_urls"'
'(--no-conf --insecure)--insecure[Do not check SSL certificates when downloading]' \
'(--no-conf --no-cache)--no-cache[Disable server-side HTTP cache]' \
"(--no-conf)--no-conf[Don't read devscripts config files]" \
'(-)*:debian package or URL: _alternative "_deb_packages available" "_urls"'
}
_dget "$@"
# Local Variables: # Local Variables:
# mode: Shell-Script # mode: Shell-Script