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

typeset -A alias_apps
alias_apps=(
	archive	extr
	audio	mplayer
	document	kpdf
	image	feh
	video	mplayer
)

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

unset filetypes meta format alias_apps