• Home
  • Raw
  • Download

Lines Matching +full:- +full:- +full:local

3    local cur="$1"
4 local bufs=$(trace-cmd list -B)
8 COMPREPLY=( $(compgen -W "${bufs}" -- "${cur}") )
14 local cur="$1"
18 local virt=`virsh list | awk '/^ *[0-9]/ { print $2 }'`
19 COMPREPLY=( $(compgen -W "${virt}" -- "${cur}") )
25 local cur="$1"
26 local options=$(trace-cmd list -o | sed -e 's/^\(no\)*\(.*\)/\2 no\2/')
27 COMPREPLY=( $(compgen -W "${options}" -- "${cur}") )
33 COMPREPLY=( $(compgen -f -- "$cur") )
34 if [ ${#COMPREPLY[@]} -gt 1 ]; then
38 DIRS=( $(compgen -d -- "$cur"))
39 if [ ${#DIRS[@]} -eq 1 ]; then
40 compopt -o nospace
49 local type="$1"
50 local cur="$2"
51 local cmds=$(trace-cmd $type -h 2>/dev/null|grep "^ *-" | \
52 sed -e 's/ *\(-[^ ]*\).*/\1/')
53 COMPREPLY=( $(compgen -W "${cmds}" -- "${cur}") )
54 if [ ${#COMPREPLY[@]} -eq 0 ]; then
61 local cur="$1"
63 local opts=$(trace-cmd list -O | sed -ne 's/option://p')
64 COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
69 local opts=$(trace-cmd list -c | grep -v 'Supported' | cut -d "," -f1)
71 COMPREPLY=( $(compgen -W "${opts}") )
76 local prev=$1
77 local cur=$2
79 local words=("$@")
83 local cmds=$(trace-cmd list -h |egrep "^ {10}-" | \
84 sed -e 's/.*\(-.\).*/\1/')
85 COMPREPLY=( $(compgen -W "${cmds}" -- "${cur}") )
89 if [ $size -gt 3 ]; then
90 if [ "$cur" == "-" ]; then
91 let size=$size-3
93 let size=$size-2
95 local w="${words[$size]}"
96 if [ "$w" == "-e" ]; then
97 local cmds=$(trace-cmd list -h |egrep "^ {12}-" | \
98 sed -e 's/.*\(-.\).*/\1/')
99 COMPREPLY=( $(compgen -W "${cmds}" -- "${cur}") )
108 local prev=$1
109 local cur=$2
111 local words=("$@")
114 -B)
125 local prev=$1
126 local cur=$2
128 local words=("$@")
134 -B)
145 local prev=$1
146 local cur=$2
148 local words=("$@")
151 -e)
152 local list=$(trace-cmd list -e "$cur")
153 local prefix=${cur%%:*}
154 if [ -z "$cur" -o "$cur" != "$prefix" ]; then
155 COMPREPLY=( $(compgen -W "all ${list}" -- "${cur}") )
157 local events=$(for e in $list; do echo ${e/*:/}; done | sort -u)
158 local systems=$(for s in $list; do echo ${s/:*/:}; done | sort -u)
160 COMPREPLY=( $(compgen -W "all ${events} ${systems}" -- "${cur}") )
164 if [[ -n "$prefix" ]]; then
165 local reply_n=${#COMPREPLY[*]}
171 -p)
172 local plugins=$(trace-cmd list -p)
173 COMPREPLY=( $(compgen -W "${plugins}" -- "${cur}" ) )
175 -l|-n|-g)
177 local funcs=$(trace-cmd list -f | sed 's/ .*//')
178 COMPREPLY=( $(compgen -W "${funcs}" -- "${cur}") )
180 -B)
183 -O)
186 -A)
191 --compression)
203 local prev=$1
204 local cur=$2
206 local words=("$@")
209 -O)
220 local prev=$1
221 local cur=$2
223 local words=("$@")
226 -i)
237 local prev=$1
238 local cur=$2
240 local words=("$@")
243 -i)
246 -o)
249 --compression)
260 local command="$1"
261 local prev="$2"
262 local cur="$3"
263 local cmds=( $(trace-cmd --help 2>/dev/null | \
264 grep " - " | sed 's/^ *//; s/ -.*//') )
268 local opts=$(trace-cmd $cmd -h 2>/dev/null|grep "^ *-" | \
269 sed -e 's/ *\(-[^ ]*\).*/\1/')
270 if [ "$prev" == "-B" ]; then
272 if [ "$opt" == "-B" ]; then
278 COMPREPLY=( $(compgen -W "${opts}" -- "$cur"))
282 if [ ${#COMPREPLY[@]} -eq 0 ]; then
289 local cur=""
290 local prev=""
291 local words=()
296 # prev="${COMP_WORDS[COMP_CWORD-1]}"
300 _get_comp_words_by_ref -n : cur prev words
302 if [ "$prev" == "trace-cmd" ]; then
303 local cmds=$(trace-cmd --help 2>/dev/null | \
304 grep " - " | sed 's/^ *//; s/ -.*//')
305 COMPREPLY=( $(compgen -W "${cmds}" -- "${cur}") )
309 local w="${words[1]}"
345 complete -F _trace_cmd_complete trace-cmd