From fc4e0cd7ba47bc87fe707f2bac8edb3461cfdd36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Wed, 2 Nov 2016 11:02:58 +0100 Subject: [PATCH] common-aliases: check if $BROWSER is defined on browser aliases --- 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 0908c8a38..e888ff076 100644 --- a/plugins/common-aliases/common-aliases.plugin.zsh +++ b/plugins/common-aliases/common-aliases.plugin.zsh @@ -54,8 +54,10 @@ alias mv='mv -i' # depends on the SUFFIX :) if is-at-least 4.2.0; then # open browser on urls - _browser_fts=(htm html de org net com at cx nl se dk dk) - for ft in $_browser_fts ; do alias -s $ft=$BROWSER ; done + if [[ -n "$BROWSER" ]]; then + _browser_fts=(htm html de org net com at cx nl se dk dk) + for ft in $_browser_fts ; do alias -s $ft=$BROWSER ; done + fi _editor_fts=(cpp cxx cc c hh h inl asc txt TXT tex) for ft in $_editor_fts ; do alias -s $ft=$EDITOR ; done