1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-29 09:10:07 +00:00

common-aliases: check if $BROWSER is defined on browser aliases

This commit is contained in:
Marc Cornellà 2016-11-02 11:02:58 +01:00
parent d47a722192
commit fc4e0cd7ba

View file

@ -54,8 +54,10 @@ alias mv='mv -i'
# depends on the SUFFIX :) # depends on the SUFFIX :)
if is-at-least 4.2.0; then if is-at-least 4.2.0; then
# open browser on urls # open browser on urls
_browser_fts=(htm html de org net com at cx nl se dk dk) if [[ -n "$BROWSER" ]]; then
for ft in $_browser_fts ; do alias -s $ft=$BROWSER ; done _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) _editor_fts=(cpp cxx cc c hh h inl asc txt TXT tex)
for ft in $_editor_fts ; do alias -s $ft=$EDITOR ; done for ft in $_editor_fts ; do alias -s $ft=$EDITOR ; done