dc59c661ac1e6c7f02382a50008470f9a6eaf636

Author
Marc Cornellà <marc.cornella@live.com>
Committer
Marc Cornellà <marc.cornella@live.com>
Date

Message

common-aliases: lazily assign $BROWSER, $EDITOR and $XIVIEWER in ext aliases

Fixes #9212

Diff

 1diff --git a/plugins/common-aliases/common-aliases.plugin.zsh b/plugins/common-aliases/common-aliases.plugin.zsh
 2index 023b1a51e28aaa683e09349a34b34d86d507484b..a9d4f1a3d2eb7ef090d84a4f77c247226990123a 100644
 3--- a/plugins/common-aliases/common-aliases.plugin.zsh
 4+++ b/plugins/common-aliases/common-aliases.plugin.zsh
 5@@ -55,15 +55,15 @@ if is-at-least 4.2.0; then
 6   # open browser on urls
 7   if [[ -n "$BROWSER" ]]; then
 8     _browser_fts=(htm html de org net com at cx nl se dk)
 9-    for ft in $_browser_fts; do alias -s $ft=$BROWSER; done
10+    for ft in $_browser_fts; do alias -s $ft='$BROWSER'; done
11   fi
12 
13   _editor_fts=(cpp cxx cc c hh h inl asc txt TXT tex)
14-  for ft in $_editor_fts; do alias -s $ft=$EDITOR; done
15+  for ft in $_editor_fts; do alias -s $ft='$EDITOR'; done
16 
17   if [[ -n "$XIVIEWER" ]]; then
18     _image_fts=(jpg jpeg png gif mng tiff tif xpm)
19-    for ft in $_image_fts; do alias -s $ft=$XIVIEWER; done
20+    for ft in $_image_fts; do alias -s $ft='$XIVIEWER'; done
21   fi
22 
23   _media_fts=(ape avi flv m4a mkv mov mp3 mpeg mpg ogg ogm rm wav webm)