Lines Matching +full:- +full:- +full:exclude

2 # SPDX-License-Identifier: GPL-2.0
7 local exclude i j first
8 # Which word separators to exclude?
9 exclude="${1//[^$COMP_WORDBREAKS]}"
11 if [ -z "$exclude" ]; then
16 # re-assemble words to complete.
22 [ $i -gt 0 ] &&
23 [ -n "${COMP_WORDS[$i]}" ] &&
25 [ "${COMP_WORDS[$i]//[^$exclude]}" = "${COMP_WORDS[$i]}" ]
29 if [ $j -ge 2 ] && [ -n "$first" ]; then
30 ((j--))
37 if (($i < ${#COMP_WORDS[@]} - 1)); then
62 local exclude cur_ words_ cword_
63 if [ "$1" = "-n" ]; then
64 exclude=$2
67 __my_reassemble_comp_words_by_ref "$exclude"
69 while [ $# -gt 0 ]; do
75 prev=${words_[$cword_-1]}
100 # Remove colon-word prefix from COMPREPLY items
103 while [[ $((--i)) -ge 0 ]]; do
111 COMPREPLY=( $( compgen -W "$1" -- "$2" ) )
128 let i=cword-1
129 cmds_=$($cmd $1 --list-cmds)
131 while [ $i -ge 0 ]; do
141 ((i--))
155 if [ -z $prev_skip_opts ]; then
156 if [[ $cur == --* ]]; then
157 cmds=$($cmd --list-opts)
159 cmds=$($cmd --list-cmds)
162 # List possible events for -e option
163 elif [[ $prev == @("-e"|"--event") &&
167 local raw_evts=$($cmd list --raw-dump)
170 if [[ "$cur1" == */* && ${cur1#*/} =~ ^[A-Z] ]]; then
200 subcmds=$($cmd $prev_skip_opts --list-cmds)
204 if [[ $cur == --* ]]; then
208 opts=$($cmd $subcmd --list-opts)
214 if [[ -n ${ZSH_VERSION-} ]]; then
215 autoload -U +X compinit && compinit
219 emulate -L zsh
222 local -a array
226 --*=*|*.) ;;
232 compset -P '*[=:]'
233 compadd -Q -S '' -a -- array && _ret=0
238 emulate -L zsh
240 local cur_="${2-$cur}"
242 local -a array
250 --*=*|*.) ;;
256 compset -P '*[=:]'
257 compadd -Q -S '' -a -- array && _ret=0
264 prev=${words[CURRENT-1]}
265 let cword=CURRENT-1
266 emulate ksh -c __perf_main
290 _get_comp_words_by_ref -n =:, cur words cword prev
292 __perf_get_comp_words_by_ref -n =:, cur words cword prev
297 complete -o bashdefault -o default -o nospace -F _perf perf 2>/dev/null \
298 || complete -o default -o nospace -F _perf perf