From ca467bd9d966169035ba620196f15f87c15bf5f4 Mon Sep 17 00:00:00 2001 From: Alexander Schlarb Date: Thu, 9 Aug 2018 21:34:08 +0200 Subject: [PATCH] common-aliases: Make media file viewer configurable using the `$XMVIEWER` variable --- plugins/common-aliases/common-aliases.plugin.zsh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/common-aliases/common-aliases.plugin.zsh b/plugins/common-aliases/common-aliases.plugin.zsh index 50bb826fd..bea6df2d9 100644 --- a/plugins/common-aliases/common-aliases.plugin.zsh +++ b/plugins/common-aliases/common-aliases.plugin.zsh @@ -120,8 +120,10 @@ if is-at-least 4.2.0; then for ft in $_image_fts; do alias -s $ft='$XIVIEWER'; done fi - _media_fts=(ape avi flv m4a mkv mov mp3 mpeg mpg ogg ogm rm wav webm) - for ft in $_media_fts; do alias -s $ft=mplayer; done + if [[ -n "$XMVIEWER" ]]; then + _media_fts=(ape avi flv m4a mkv mov mp3 mpeg mpg ogg ogm rm wav webm) + for ft in $_media_fts; do alias -s $ft=$XMVIEWER; done + fi #read documents alias -s pdf=acroread