Files
RedBear-OS/recipes/shells/zsh/source/Completion/Zsh/Context/_value
T
vasilito ff4ff35918 feat: track all source trees in git — full fork offline-first model
Red Bear OS is a full fork. All sources must be available from git clone
with zero network access. Removed gitignore rules that excluded fetched
source trees under recipes/*/source/, local/recipes/kde/*/source/,
local/recipes/qt/*/source/, and vendor source trees.

Build artifacts (target/, build/, source.tar, *.o, *.so) remain excluded.

127291 files added — kernel, relibc, base, bootloader, pkgar, all KDE/Qt
frameworks, mesa, wayland, DRM drivers, and every other recipe source.
2026-05-14 10:55:53 +01:00

51 lines
1.6 KiB
Plaintext

#compdef -value- -array-value- -value-,-default-,-default-
# You can customize completion for different parameters by writing
# functions with the tag-line `#compdef -value-,<name>,<command>' where
# <name> is the name of the parameter (or name-key when completing an
# associative array value) and <command> is either `-default-' or the
# name of the command from the command-line.
if [[ "$service" != -value-,* ]]; then
local strs ctx=
strs=( -default- )
if [[ "$compstate[context]" != *value && -n "$_comp_command1" ]]; then
ctx="${_comp_command}"
strs=( "${_comp_command1}" "$strs[@]" )
[[ -n "$_comp_command2" ]] &&
strs=( "${_comp_command2}" "$strs[@]" )
fi
_dispatch -value-,${compstate[parameter]},$ctx \
-value-,{${compstate[parameter]},-default-},${^strs}
else
if [[ "$compstate[parameter]" != *-* &&
"$compstate[context]" = array_value &&
"${(Pt)${compstate[parameter]}}" = assoc* ]]; then
local expl
if (( CURRENT & 1 )); then
_wanted association-keys expl 'association key' \
compadd -k "$compstate[parameter]"
else
compstate[parameter]="${compstate[parameter]}-${words[CURRENT-1]}"
_dispatch -value-,${compstate[parameter]}, \
-value-,{${compstate[parameter]},-default-},-default-
fi
else
local pats
if { zstyle -a ":completion:${curcontext}:" assign-list pats &&
[[ "$compstate[parameter]" = (${(j:|:)~pats}) ]] } ||
[[ "$PREFIX$SUFFIX" = *:* ]]; then
compset -P '*:'
compset -S ':*'
_default -r '\-\n\t /:' "$@"
else
_default "$@"
fi
fi
fi