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,10 +39,6 @@
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
_dget() {
local context state line expl
local -A opt_args
_arguments -A "-*" \ _arguments -A "-*" \
'(- *)'{-h,--help}'[Show help message]' \ '(- *)'{-h,--help}'[Show help message]' \
'(- *)'{-v,--version}'[Print license, copyright, and version information and exit]' \ '(- *)'{-v,--version}'[Print license, copyright, and version information and exit]' \
@ -54,13 +50,10 @@ _dget() {
'(--no-conf -u --allow-unauthenticated)'{-u,--allow-unauthenticated}'[Make no attempt to verify source package signature]' \ '(--no-conf -u --allow-unauthenticated)'{-u,--allow-unauthenticated}'[Make no attempt to verify source package signature]' \
'(--no-conf -x --extract -d --download-only --build)--build[Build package with dpkg-buildpackage after download]' \ '(--no-conf -x --extract -d --download-only --build)--build[Build package with dpkg-buildpackage after download]' \
'(--no-conf)--path[Check this directory in addition to the apt archive]:DIR:_files -/' \ '(--no-conf)--path[Check this directory in addition to the apt archive]:DIR:_files -/' \
'(--no-conf --insecure)--insecure[Do not check SSL certificates when downloading]' \ '(--no-conf -k --insecure)'{-k,--insecure}'[Do not check SSL certificates when downloading]' \
'(--no-conf --no-cache)--no-cache[Disable server-side HTTP cache]' \ '(--no-conf --no-cache)--no-cache[Disable server-side HTTP cache]' \
"(--no-conf)--no-conf[Don't read devscripts config files]" \ "(--no-conf)--no-conf[Don't read devscripts config files]" \
'(-)*:debian package or URL: _alternative "_deb_packages available" "_urls"' '(-)*:debian package or URL: _alternative "_deb_packages available" "_urls"'
}
_dget "$@"
# Local Variables: # Local Variables:
# mode: Shell-Script # mode: Shell-Script