summaryrefslogtreecommitdiffstats
path: root/scripts/debchange.bash_completion
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 12:01:11 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 12:01:11 +0000
commit3be121a05dcd170854a8dac6437b29f297a6ff4e (patch)
tree05cf57183f5a23394eca11b00f97a74a5dfdf79d /scripts/debchange.bash_completion
parentInitial commit. (diff)
downloaddevscripts-3be121a05dcd170854a8dac6437b29f297a6ff4e.tar.xz
devscripts-3be121a05dcd170854a8dac6437b29f297a6ff4e.zip
Adding upstream version 2.23.4+deb12u1.upstream/2.23.4+deb12u1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'scripts/debchange.bash_completion')
-rw-r--r--scripts/debchange.bash_completion90
1 files changed, 90 insertions, 0 deletions
diff --git a/scripts/debchange.bash_completion b/scripts/debchange.bash_completion
new file mode 100644
index 0000000..e2f89c9
--- /dev/null
+++ b/scripts/debchange.bash_completion
@@ -0,0 +1,90 @@
+# /usr/share/bash-completion/completions/debchange
+# Bash command completion for ‘debchange(1)’.
+# Documentation: ‘bash(1)’, section “Programmable Completion”.
+
+_debchange()
+{
+ local cur prev options
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+ options='-a --append -i --increment -v --newversion -e --edit\
+ -r --release --force-save-on-release --no-force-save-on-release\
+ --create --empty --package --auto-nmu --no-auto-nmu -n --nmu --lts\
+ --bin-nmu -q --qa -R --rebuild -s --security --team -U --upstream\
+ --bpo --stable -l --local -b --force-bad-version --allow-lower-version\
+ --force-distribution --closes --noquery --query -d --fromdirname\
+ -p --preserve --no-preserve --vendor -D --distribution\
+ -u --urgency -c --changelog --news --nomultimaint --multimaint\
+ --nomultimaint-merge --multimaint-merge -m --maintmaint\
+ -M --controlmaint -t --mainttrailer --check-dirname-level\
+ --check-dirname-regex --no-conf --noconf --release-heuristic\
+ --help -h --version'
+
+#--------------------------------------------------------------------------
+#FIXME: I don't want hard-coding codename...
+#--------------------------------------------------------------------------
+ oldstable_codename='bullseye'
+ stable_codename='bookworm'
+ testing_codename='trixie'
+
+ lts='buster-lts'
+
+ distro="oldstable-security oldstable-proposed-updates\
+ "$oldstable_codename"-security\
+ "$oldstable_codename"-backports\
+ "$oldstable_codename"-backports-sloppy\
+ stable-security stable-proposed-updates\
+ "$stable_codename"-security\
+ "$stable_codename"-backports\
+ "$stable_codename"-updates\
+ testing-security testing-proposed-updates\
+ "$testing_codename"-security\
+ unstable experimental $lts"
+
+ urgency='low medium high critical'
+
+ case $prev in
+ --changelog | -c | --news)
+ COMPREPLY=( $( compgen -G "${cur}*" ) )
+ ;;
+ --check-dirname-level)
+ COMPREPLY=( $( compgen -W [0 1 2] ) )
+ ;;
+#FIXME: we need "querybts --list" option with no verbose output
+# --closes)
+# package=`dpkg-parsechangelog -SSource`
+# bugnumber=`querybts --list -b $package|grep ^#|cut -d' ' -f1`
+# COMPREPLY=( $( compgen -W "$bugnumber" ) )
+# ;;
+ -D | --distribution)
+ COMPREPLY=( $( compgen -W "$distro" ) )
+ ;;
+ --newversion | -v | --package | --local | -l | --allow-lower-version)
+ ;;
+ --release-heuristic)
+ COMPREPLY=( $( compgen -W 'log changelog' ) )
+ ;;
+ -u | --urgency)
+ COMPREPLY=( $( compgen -W "$urgency" ) )
+ ;;
+ *)
+ COMPREPLY=( $(
+ compgen -W "$options" | grep "^$cur"
+ ) )
+ ;;
+ esac
+
+ return 0
+
+}
+complete -F _debchange debchange dch
+
+
+# Local variables:
+# coding: utf-8
+# mode: shell-script
+# indent-tabs-mode: nil
+# End:
+# vim: fileencoding=utf-8 filetype=sh expandtab shiftwidth=4 :