| Server IP : 142.11.234.102 / Your IP : 216.73.217.70 Web Server : Apache System : Linux dal-shared-66.hostwindsdns.com 4.18.0-513.24.1.lve.1.el8.x86_64 #1 SMP Thu May 9 15:10:09 UTC 2024 x86_64 User : krnuyqrm ( 1183) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/self/root/proc/thread-self/root/proc/thread-self/root/usr/share/zsh/5.5.1/functions/ |
Upload File : |
#autoload
local comp pat val name i ret=1 _compskip="$_compskip"
local curcontext="$curcontext" service str noskip
local -a match mbegin mend
# If we get the option `-s', we don't reset `_compskip'.
if [[ "$1" = -s ]]; then
noskip=yes
shift
fi
[[ -z "$noskip" ]] && _compskip=
curcontext="${curcontext%:*:*}:${1}:"
shift
# See if there are any matching pattern completions.
if [[ "$_compskip" != (all|*patterns*) ]]; then
for str in "$@"; do
[[ -n "$str" ]] || continue
service="${_services[$str]:-$str}"
for i in "${(@)_patcomps[(K)$str]}"; do
if [[ $i = (#b)"="([^=]#)"="(*) ]]; then
service=$match[1]
i=$match[2]
fi
eval "$i" && ret=0
if [[ "$_compskip" = *patterns* ]]; then
break
elif [[ "$_compskip" = all ]]; then
_compskip=''
return ret
fi
done
done
fi
# Now look up the names in the normal completion array.
ret=1
for str in "$@"; do
[[ -n "$str" ]] || continue
# The following means we look up the names of commands
# after stripping quotes. This is presumably correct,
# but do we need to do the same elsewhere?
str=${(Q)str}
name="$str"
comp="${_comps[$str]}"
service="${_services[$str]:-$str}"
[[ -z "$comp" ]] || break
done
# And generate the matches, probably using default completion.
if [[ -n "$comp" && "$name" != "${argv[-1]}" ]]; then
_compskip=patterns
eval "$comp" && ret=0
[[ "$_compskip" = (all|*patterns*) ]] && return ret
fi
if [[ "$_compskip" != (all|*patterns*) ]]; then
for str; do
[[ -n "$str" ]] || continue
service="${_services[$str]:-$str}"
for i in "${(@)_postpatcomps[(K)$str]}"; do
_compskip=default
eval "$i" && ret=0
if [[ "$_compskip" = *patterns* ]]; then
break
elif [[ "$_compskip" = all ]]; then
_compskip=''
return ret
fi
done
done
fi
[[ "$name" = "${argv[-1]}" && -n "$comp" &&
"$_compskip" != (all|*default*) ]] &&
service="${_services[$name]:-$name}" &&
eval "$comp" && ret=0
_compskip=''
return ret