diff options
Diffstat (limited to 'etc/aliases/suffix')
-rw-r--r-- | etc/aliases/suffix | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/etc/aliases/suffix b/etc/aliases/suffix index 548da60..0c65430 100644 --- a/etc/aliases/suffix +++ b/etc/aliases/suffix @@ -2,17 +2,19 @@ ## 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' -image_app='feh' -video_app='mplayer' +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); { - eval alias -s $format="$"${meta}_app + alias -s $format=$alias_apps[$meta] } - unset ${meta}_app } -unset filetypes meta format +unset filetypes meta format alias_apps |