summaryrefslogtreecommitdiffstats
path: root/debian/thunderbird.bash-completion
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:33:31 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:33:31 +0000
commita820a96849e295d4abc6238a01c650bf3663b774 (patch)
treebcebc68af266bfcc779f699ad3d5eeb05b067216 /debian/thunderbird.bash-completion
parentAdding upstream version 1:115.7.0. (diff)
downloadthunderbird-a820a96849e295d4abc6238a01c650bf3663b774.tar.xz
thunderbird-a820a96849e295d4abc6238a01c650bf3663b774.zip
Adding debian version 1:115.7.0-1~deb12u1.debian/1%115.7.0-1_deb12u1debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/thunderbird.bash-completion')
-rw-r--r--debian/thunderbird.bash-completion65
1 files changed, 65 insertions, 0 deletions
diff --git a/debian/thunderbird.bash-completion b/debian/thunderbird.bash-completion
new file mode 100644
index 0000000000..e61cb10946
--- /dev/null
+++ b/debian/thunderbird.bash-completion
@@ -0,0 +1,65 @@
+# bash completion for thunderbird(1) -*- shell-script -*-
+#
+# Copyright (C) 2017 Carsten Schoenert <c.schoenert@t-online.de>
+
+_thunderbird() {
+local cur prev OPTS FLAG_FIXMIME FLAG_SHOW_BACKUP
+COMPREPLY=()
+cur="${COMP_WORDS[COMP_CWORD]}"
+prev="${COMP_WORDS[COMP_CWORD-1]}"
+OPTS="--fixmime --help --show-backup -g --verbose"
+
+case $prev in
+ '--fixmime')
+ # Check if '--verbose' is already given, this is the only option that
+ # '--fixmime' should be combined
+ if [ ! $(compgen -W "${COMP_WORDS[*]}" -- "--verbose") ]; then
+ COMPREPLY=( $(compgen -W "--verbose" -- $cur) )
+ fi
+ return 0
+ ;;
+
+ '--help'|'-g')
+ return 0
+ ;;
+
+ '--show-backup')
+ # Check if '--verbose' is already given, this is the only option that
+ # --show-backup should be combined
+ if [ ! $(compgen -W "${COMP_WORDS[*]}" -- "--verbose") ]; then
+ COMPREPLY=( $(compgen -W "--verbose" -- $cur) )
+ fi
+ return 0
+ ;;
+
+ '--verbose')
+ FLAG_FIXMIME=""
+ FLAG_SHOW_BACKUP=""
+
+ # Check if '--fixmime' is already given
+ if [ $(compgen -W "${COMP_WORDS[*]}" -- "--fixmime") ]; then
+ # Yes, we have seen '-fixmime'
+ FLAG_FIXMIME=1
+ fi
+
+ # Check if '--show-backup' is already given
+ if [ $(compgen -W "${COMP_WORDS[*]}" -- "--show-backup") ]; then
+ # Yes, we have seen '--show-backup'
+ FLAG_SHOW_BACKUP=1
+ fi
+
+ if [ "$FLAG_FIXMIME" != "1" ] && [ "$FLAG_SHOW_BACKUP" != "1" ]; then
+ COMPREPLY=( $(compgen -W "--fixmime --show-backup" -- $cur) )
+ fi
+ return 0
+ ;;
+
+esac
+
+ COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
+ return 0
+
+} &&
+complete -F _thunderbird thunderbird
+
+# ex: ts=4 sw=4 et filetype=sh