summaryrefslogtreecommitdiff
path: root/etc/aliases/suffix
blob: c380156481f969926e1eba769b2c886d7541818f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## Sufix aliases
## Like, enter "somefile.ogg" and zsh will automatically open it using $audio_app
## vim:ft=zsh

archive_app='extr'
audio_app='mplayer'
document_app='kpdf'
emul_app='wine'
image_app='feh'
midi_app='timidity'
office_app='openoffice'
raw_app='vim'
video_app='mplayer'
web_app='x-www-browser'

for meta in ${parameters[(I)mime_*]#mime_}; {
	for format in $(eval echo "$"mime_$meta); {
		eval alias -s $format="$"${meta}_app
	}
	unset ${meta}_app
}

unset filetypes meta format