22
23
grep "^\[.*\]" $HOME/.dput.cf 2> /dev/null | tr -d [] || /bin/true
23
24
grep "^\[.*\]" /etc/dput.cf 2> /dev/null | tr -d [] || /bin/true
24
for file in $(ls $HOME/dput.d/profiles/*.json 2> /dev/null); do \
25
for file in $(ls $HOME/.dput.d/profiles/*.json 2> /dev/null); do \
25
26
basename $file .json; \
27
28
for file in $(ls /etc/dput.d/profiles/*.json 2> /dev/null); do \
58
59
[ "$have" ] && complete -F _dput -o filenames -o plusdirs dput
64
local cur prev options paroptions hosts
67
cur=${COMP_WORDS[COMP_CWORD]}
68
prev=${COMP_WORDS[COMP_CWORD-1]}
69
options='-c --config -d --debug -f --force -k --keyid -m --maintainer \
70
-O --output -P --passive -s --simulate -v --version'
74
grep "^\[.*\]" $HOME/.dput.cf 2> /dev/null | tr -d [] || /bin/true
75
grep "^\[.*\]" /etc/dput.cf 2> /dev/null | tr -d [] || /bin/true
76
for file in $(ls $HOME/.dput.d/profiles/*.json 2> /dev/null); do \
77
basename $file .json; \
79
for file in $(ls /etc/dput.d/profiles/*.json 2> /dev/null); do \
80
basename $file .json; \
82
for file in $(ls /usr/share/dput-ng/profiles/*.json 2> /dev/null); do \
83
basename $file .json; \
85
} | grep -v '^DEFAULT$' | sort -u)
91
cmd=$cmd" profile = dput.profile.load_profile('$prev')\n"
92
cmd=$cmd" cmds = dput.command.load_commands(profile)\n"
93
cmd=$cmd"except dput.exceptions.DputConfigurationError:\n"
94
cmd=$cmd" cmds = []\n"
95
cmd=$cmd"print ' '.join([x.name_and_purpose()[0] for x in cmds])"
96
echo $cmd | sed 's/\\n/\'$'\n/g' | python
99
paroptions="$options $hosts $commands"
103
COMPREPLY=( $( compgen -o filenames -G "$cur*" ) )
107
compgen -G "${cur}*.changes"
108
compgen -W "$paroptions" | grep "^$cur"
116
[ "$have" ] && complete -F _dcut -o filenames -o plusdirs dcut