blob: ad4eb79e944d61d642faf7b205233bd668e52315 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#!/usr/bin/env zsh
typeset -a audio video image
typeset c_audio='04;36' c_video='04;32' c_image='04;33'
while read mime extensions; do
[[ $mime == audio/* ]] && audio+=(${(s/ /)extensions})
[[ $mime == video/* ]] && video+=(${(s/ /)extensions})
[[ $mime == image/* ]] && image+=(${(s/ /)extensions})
done < /etc/mime.types
audio=(${(i)audio})
video=(${(i)video})
image=(${(i)image})
echo "mime_audio=($audio)"
echo "mime_video=($video)"
echo "mime_image=($image)"
|