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
28 grep --no-filename "^\[.*\]" "${config_files[@]}" \
30 |
tr --delete [] ||
/bin
/true
31 } |
grep --invert-match '^DEFAULT$' |
sort --unique )
35 local delayed_options
='0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15'
36 COMPREPLY
=( $
( compgen
-W "$delayed_options" -- "$cur" ) )
39 COMPREPLY
=( $
( compgen
-o filenames
-G "${cur}*" ) )
43 compgen
-G "${cur}*.changes"
44 compgen
-G "${cur}*.dsc"
45 compgen
-W "$hosts" -- "$cur"
46 compgen
-W "$options" -- "$cur"
53 } && complete
-F _dput
-o filenames
-o plusdirs dput
56 # Copyright © 2015–2016 Ben Finney <bignose@debian.org>
57 # Copyright © 2002 Roland Mas <lolando@debian.org>
59 # This is free software: you may copy, modify, and/or distribute this work
60 # under the terms of the GNU General Public License as published by the
61 # Free Software Foundation; version 3 of that license or any later version.
62 # No warranty expressed or implied. See the file ‘LICENSE.GPL-3’ for details.
68 # vim: fileencoding=utf-8 filetype=sh :