mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-15 09:58:47 -07:00
common-aliases: lazily assign $BROWSER, $EDITOR and $XIVIEWER in ext aliases
Fixes #9212
This commit is contained in:
parent
50dc4ab357
commit
dc59c661ac
@ -55,15 +55,15 @@ if is-at-least 4.2.0; then
|
|||||||
# open browser on urls
|
# open browser on urls
|
||||||
if [[ -n "$BROWSER" ]]; then
|
if [[ -n "$BROWSER" ]]; then
|
||||||
_browser_fts=(htm html de org net com at cx nl se dk)
|
_browser_fts=(htm html de org net com at cx nl se dk)
|
||||||
for ft in $_browser_fts; do alias -s $ft=$BROWSER; done
|
for ft in $_browser_fts; do alias -s $ft='$BROWSER'; done
|
||||||
fi
|
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
|
||||||
|
|
||||||
if [[ -n "$XIVIEWER" ]]; then
|
if [[ -n "$XIVIEWER" ]]; then
|
||||||
_image_fts=(jpg jpeg png gif mng tiff tif xpm)
|
_image_fts=(jpg jpeg png gif mng tiff tif xpm)
|
||||||
for ft in $_image_fts; do alias -s $ft=$XIVIEWER; done
|
for ft in $_image_fts; do alias -s $ft='$XIVIEWER'; done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
_media_fts=(ape avi flv m4a mkv mov mp3 mpeg mpg ogg ogm rm wav webm)
|
_media_fts=(ape avi flv m4a mkv mov mp3 mpeg mpg ogg ogm rm wav webm)
|
||||||
|
Loading…
Reference in New Issue
Block a user