HEX
Server: Apache
System: Linux pdx1-shared-a2-09 6.6.116-grsec-jammy-dirty #1 SMP Sat Nov 8 00:02:42 UTC 2025 x86_64
User: dh_pvsc7i (5084578)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //usr/share/zsh/functions/MIME/zsh-mime-contexts
# 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