From efe47381c599b07e4c7bbdb2e91e8090a541c887 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 17:53:52 +0200 Subject: Adding upstream version 2.23.4+deb12u1. Signed-off-by: Daniel Baumann --- scripts/debuild.bash_completion | 103 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 scripts/debuild.bash_completion (limited to 'scripts/debuild.bash_completion') diff --git a/scripts/debuild.bash_completion b/scripts/debuild.bash_completion new file mode 100644 index 0000000..22787bc --- /dev/null +++ b/scripts/debuild.bash_completion @@ -0,0 +1,103 @@ +# /usr/share/bash-completion/completions/debuild +# Bash command completion for ‘debuild(1)’. +# Documentation: ‘bash(1)’, section “Programmable Completion”. + +# Copyright © 2015, Nicholas Bamber + +_debuild() +{ + local cur prev words cword i _options special _prefix + _init_completion || return + + for (( i=${#words[@]}-1; i > 0; i-- )); do + if [[ ${words[i]} == @(binary|binary-arch|binary-indep|clean|--lintian-opts) ]]; then + special=${words[i]} + break + fi + done + + if [[ -n $special ]]; then + + case $special in + --lintian-opts) + case $prev in + --include-dir) + COMPREPLY=( $( compgen -o filenames -d -- "$cur" ) ) + return 0 + ;; + --tags-from-file|--cfg|--suppress-tags-from-file) + COMPREPLY=( $( compgen -o filenames -f -- "$cur" ) ) + return 0 + ;; + --color) + COMPREPLY=( $( compgen -W 'never always auto html' -- "$cur" ) ) + return 0 + ;; + --display-source) + COMPREPLY=( $( compgen -W 'policy devref' -- "$cur" ) ) + return 0 + ;; + esac + COMPREPLY=( $( compgen -W '-C --ftp-master-rejects --tags --tags-from-file --color --default-display-level --display-source --display-experimental --no-display-experimental --fail-on-warnings --info --display-info --no-override --pedantic --show-overrides --suppress-tags --suppress-tags-from-file --cfg --no-cfg --ignore-lintian-env --include-dir' -- "$cur" ) ) + return 0 + ;; + *) + COMPREPLY=( $( compgen -W 'binary binary-arch binary-indep clean' -- "$cur" ) ) + return 0 + ;; + esac + fi + + case $prev in + --rootcmd) + _options= + for i in fakeroot super sudo + do + which $i > /dev/null && _options+=" ${i}" + done + COMPREPLY=( $( compgen -W "${_options}" -- "$cur" ) ) + return 0 + ;; + --preserve-envvar) + COMPREPLY=( $( compgen -o nospace -e -- "$cur" ) ) + return 0 + ;; + --set-envvar) + COMPREPLY=( $( compgen -o nospace -e -S'=' -- "$cur" ) ) + return 0 + ;; + --prepend-path|--admindir) + COMPREPLY=( $( compgen -o filenames -d -- "$cur" )) + return 0 + ;; + --check-dirname-level) + COMPREPLY=( $( compgen -W '0 1 2' -- "$cur" ) ) + return 0 + ;; + -j) + COMPREPLY=( $( compgen -W 'auto 1 2 3 4 5 6' -- "$cur" ) ) + return 0 + ;; + esac + + if [[ "$cur" == -* ]]; then + _options='--preserve-envvar --set-envvar --rootcmd --preserve-env --prepend-path --lintian --no-lintian --no-tgz-check --tgz-check --username --clear-hooks --check-dirname-level --check-dirname-regex -d -D --dpkg-buildpackage-hook --clean-hook --dpkg-source-hook --dpkg-build-hook --dpkg-binary-hook --dpkg-genchanges-hook --final-clean-hook --lintian-hook signing-hook post-dpkg-buildpackage-hook --lintian-opts -g -G -b -B -A -S -F -si -sa -sd -v -C -m -e -a --host-type --target-arch --target-type -P -j -D -d -nc -tc --admindir --changes-options --source-options -z -Z -i -I -sn -ss -sA -sk -su -sr -sK -sU -sR --force-sign -us -uc -k -p --check-option --check-command -R -r' + if [[ "$prev" == debuild ]]; then + _options+=' --no-conf' + fi + COMPREPLY=( $( compgen -W "${_options}" -- "$cur" ) ) + else + COMPREPLY=( $( compgen -W 'binary binary-arch binary-indep clean' -- "$cur" ) ) + fi + + return 0 +} && +complete -F _debuild debuild + + +# Local variables: +# coding: utf-8 +# mode: shell-script +# indent-tabs-mode: nil +# End: +# vim: fileencoding=utf-8 filetype=sh expandtab shiftwidth=4 : -- cgit v1.2.3