Files
RedBear-OS/recipes/shells/zsh/source/Completion/X/Command/_zeal
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

44 lines
1.3 KiB
Plaintext

#compdef zeal
local curcontext="$curcontext" cfg docset setdir mbegin mend ret=1
local -a state line expl suf docsets globbed match
local -A opt_args dsets
_arguments -S \
':query:->queries' \
+ '(opt)' \
{-h,--help}'[display help information]' \
{-v,--version}'[display version information]' \
{-f,--force}'[force the application to run]' && ret=0
if [[ -n $state ]]; then
cfg=${XDG_CONFIG_HOME:-~/.config}/Zeal/Zeal.conf
if [[ -r $cfg ]]; then
docsets=${${(M)${(f)"$(<$cfg)"}:#path=*}#path=}
else
docsets=${XDG_DATA_HOME:-~/.local/share}/Zeal/Zeal/docsets
fi
for docset in $docsets/*.docset/Contents/Info.plist(N); do
setdir=${docset:h:h:r:t:l:gs/+/p}
[[ $(<$docset) = *DocSetPlatformFamily\<[^\<]#\<string\>(#b)([^\<]#)* ]] ||
match=( ${docset:h:h:r:t:l:gs/+/p} )
dsets+=( $match[1] ${docset:h} )
done
if compset -P 1 '*:'; then
globbed=( ${dsets[${IPREFIX%:}]}/Resources/docSet.dsidx(N[1]) )
if (( $+commands[sqlite3] )) && [[ -e $globbed ]]; then
_description queries expl 'query'
compadd "$expl[@]" - ${(f)"$(_call_program queries
sqlite3 $globbed 'select name from searchIndex')"} && ret=0
else
_message -e queries 'query'
fi
else
compset -S ':*' || suf=( -qS : )
_description docsets expl 'docset'
compadd "$expl[@]" $suf -k dsets && ret=0
fi
fi
return ret