blob: d20f9c893414feaa45ea4afade8de4a6a1189bc6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#!/usr/bin/env zsh
typeset -a audio video image
. etc/mime-setup
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})
for mimetype in $audio; {
[[ ${mime_audio[(I)$mimetype]} == 0 ]] && echo "mime_audio+=$mimetype"
}
for mimetype in $video; {
[[ ${mime_video[(I)$mimetype]} == 0 ]] && echo "mime_video+=$mimetype"
}
for mimetype in $image; {
[[ ${mime_image[(I)$mimetype]} == 0 ]] && echo "mime_image+=$mimetype"
}
echo "mime_audio=($audio)"
echo "mime_video=($video)"
echo "mime_image=($image)"
|