Files
RedBear-OS/recipes/shells/zsh/source/Functions/MIME/zsh-mime-contexts
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

25 lines
491 B
Plaintext

# Helper for zsh-mime-handler.
#
# Pass in a zstyle option, a suffix, which might include multiple parts
# (e.g. pdf.gz), plus remaining zstyle arguments plus arguments to zstyle.
# Try to match the style starting with the longest possible suffix.
local context suffix option
option=$1
shift
suffix=$1
shift
while true; do
context=":mime:.${suffix}:"
zstyle $option $context "$@" && return 0
if [[ $suffix = *.* ]]; then
suffix=${suffix#*.}
else
break
fi
done
return 1