1 # bash-completion/dput.bash
2 # Programmable Bash command completion for ‘dput’ command.
3 # See the Bash manual “Programmable Completion” section.
5 # This is free software, and you are welcome to redistribute it under
6 # certain conditions; see the end of this file for copyright
7 # information, grant of license, and disclaimer of warranty.
13 local cur
="${COMP_WORDS[COMP_CWORD]}"
14 local prev
="${COMP_WORDS[COMP_CWORD-1]}"
17 -c --config -d --debug -D --dinstall -f --force -h --help
18 -H --host-list -l --lintian -o --check-only -p --print
19 -P --passive -s --simulate -u --unchecked -e --delayed
20 -v --version -V --check-version
24 grep "^\[.*\]" $HOME/.dput.cf
2> /dev
/null |
tr -d [] ||
/bin
/true
25 grep "^\[.*\]" /etc
/dput.cf
2> /dev
/null |
tr -d [] ||
/bin
/true
26 } |
grep -v '^DEFAULT$' |
sort -u)
30 local delayed_options
='0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15'
31 COMPREPLY
=( $
( compgen
-W "$delayed_options" |
grep ^
$cur ) )
34 COMPREPLY
=( $
( compgen
-o filenames
-G "$cur*" ) )
38 compgen
-G "${cur}*.changes"
39 compgen
-G "${cur}*.asc"
40 compgen
-G "${cur}*.sig"
41 compgen
-W "$hosts" |
grep "^$cur"
42 compgen
-W "$options" |
grep "^$cur"
49 } && complete
-F _dput
-o filenames
-o plusdirs dput
52 # Copyright © 2015–2016 Ben Finney <bignose@debian.org>
53 # Copyright © 2002 Roland Mas <lolando@debian.org>
55 # This is free software: you may copy, modify, and/or distribute this work
56 # under the terms of the GNU General Public License as published by the
57 # Free Software Foundation; version 3 of that license or any later version.
58 # No warranty expressed or implied. See the file ‘LICENSE.GPL-3’ for details.
64 # vim: fileencoding=utf-8 filetype=sh :