-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathgcc.sh
30 lines (26 loc) · 945 Bytes
/
gcc.sh
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
#!/usr/bin/env bash
# Automatic generated, DON'T MODIFY IT.
# @arg words~[`_choice_delegate`]
. "$ARGC_COMPLETIONS_ROOT/utils/_argc_utils.sh"
_choice_delegate() {
if _argc_util_has_path_prefix; then
echo "__argc_value=path"
return
fi
if [[ "$ARGC_CWORD" == -* ]]; then
if [[ "$ARGC_CWORD" == *'='* ]]; then
prefix="${ARGC_CWORD%%=*}="
echo "__argc_prefix=$prefix"
echo "__argc_filter=${ARGC_CWORD#*=}"
"${argc__args[0]}" --completion="$ARGC_CWORD" | sed "s/$prefix//"
else
"${argc__args[0]}" --completion="$ARGC_CWORD" | sed 's/=.*/=\x00/'
fi
elif [[ ${#argc__args[@]} -gt 2 ]]; then
prev="${argc__args[-2]}"
if [[ "$prev" == -* ]]; then
"${argc__args[0]}" --completion="$prev $ARGC_CWORD" | sed -e "s/$prev\s\+//" -e 's/=$/=\x00/'
fi
fi
}
command eval "$(argc --argc-eval "$0" "$@")"