1
0
Fork 0
devscripts/scripts/debsign.bash_completion
Daniel Baumann b543f2e88d
Adding upstream version 2.25.15.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-21 11:04:07 +02:00

99 lines
3 KiB
Bash
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# /usr/share/bash-completion/completions/debsign
# Bash command completion for debsign(1).
# Documentation: bash(1), section “Programmable Completion”.
shopt -s progcomp
_have _debsign_completion &&
_debsign_completion () {
COMPREPLY=()
local cur="${COMP_WORDS[COMP_CWORD]}"
local prev="${COMP_WORDS[COMP_CWORD-1]}"
local options=(
-h --help --version
-r -m -e -k
-a -t --multi
-p --debs-dir
-S
--re-sign --no-re-sign
--no-conf --noconf
)
case "$prev" in
-r)
# The option requires a non-option argument here, but we
# have no feasible way to generate auto-completion matches
# for username@remotehost. Use an empty set.
local host_options=""
COMPREPLY=( $(compgen -W "$host_options" -- "$cur") )
;;
-m|-e)
# The previous option requires an argument, but we
# have no feasible way to generate auto-completion matches
# for a maintainer identifier. Use an empty set.
local maintainer_options=""
COMPREPLY=( $(compgen -W "$maintainer_options" -- "$cur") )
;;
-k)
# Provide completions for OpenPGP secret key IDs.
local keyid_options=$(
gpg --fixed-list-mode --with-colons --fingerprint \
--list-secret-keys \
| awk -F':' '/^sec/{print $5}' )
COMPREPLY=( $(
compgen -W "$keyid_options" | grep "^${cur:-.}"
) )
;;
-a)
# Provide completions for system architecture identifiers.
local arch_options=$(dpkg-architecture --list-known)
COMPREPLY=( $(compgen -W "$arch_options" -- "$cur") )
;;
-t)
# The previous option requires an argument, but we
# have no feasible way to generate auto-completion matches
# for a GNU system type identifier. Use an empty set.
local type_options=""
COMPREPLY=( $(compgen -W "$type_options" -- "$cur") )
;;
-p)
# Provide completions for available commands.
COMPREPLY=( $(compgen -A command -- "$cur") )
;;
--debs-dir)
# Provide completions for existing directory paths.
COMPREPLY=( $(compgen -o dirnames -A directory -- "$cur") )
;;
*)
COMPREPLY=( $(
compgen -G "${cur}*.changes"
compgen -G "${cur}*.buildinfo"
compgen -G "${cur}*.dsc"
compgen -G "${cur}*.commands"
compgen -W "${options[*]}" -- "$cur"
) )
compopt -o filenames
compopt -o plusdirs
;;
esac
return 0
} && complete -F _debsign_completion debsign
# Local variables:
# coding: utf-8
# mode: shell-script
# indent-tabs-mode: nil
# End:
# vim: fileencoding=utf-8 filetype=sh expandtab shiftwidth=4 :