summaryrefslogtreecommitdiff
path: root/etc/aliases/suffix
blob: 2587c3e26450a99507a1e2febc35a011d7aff983 (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	extract
	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