blob: 41c315fa915ff7d74fb7e50b002857391584ff25 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
# Gentoo Linux Bash Shell Command Completion
#
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License, v2 or later
#
# distcc-config completion command
#
_distccconfig()
{
local cur curword numwords opts
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
numwords=${#COMP_WORDS[*]}
curword=${COMP_CWORD}
if [[ ${numwords} -gt 3 ]]; then
unset COMPREPLY
return 0
fi
if [[ "${cur}" == -* ]] || [ ${curword} -eq 1 ]; then
if [[ ${numwords} -le 2 ]] && [[ ${curword} -eq 1 ]]; then
opts="--get-hosts \
--get-verbose \
--get-log \
--set-hosts \
--set-verbose \
--set-log \
--add-path \
--no-path"
else
opts=""
fi
else
opts=""
fi
COMPREPLY=($(compgen -W "${opts}" | grep ^$cur))
return 0
} &&
complete -F _distccconfig distcc-config
# vim: ft=sh:et:ts=4:sw=4:tw=80
|