mirror of
https://github.com/robbyrussell/oh-my-zsh.git
synced 2026-02-13 21:00:57 +01:00
common-aliases: Do not presume that $EDITOR (or $VISUAL for that matter) are always set
This commit is contained in:
@@ -58,8 +58,15 @@ if is-at-least 4.2.0; then
|
||||
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
|
||||
# open editable text files in text editor
|
||||
if [[ -n "$VISUAL" ]] || [[ -n "$EDITOR" ]]; then
|
||||
_editor_fts=(cpp cxx cc c hh h inl asc txt TXT tex)
|
||||
if [[ -n "$VISUAL" ]]; then
|
||||
for ft in $_editor_fts; do alias -s $ft='$VISUAL'; done
|
||||
else
|
||||
for ft in $_editor_fts; do alias -s $ft='$EDITOR'; done
|
||||
fi
|
||||
fi
|
||||
|
||||
# open image files in image viewer
|
||||
if [[ -n "$XIVIEWER" ]]; then
|
||||
|
||||
Reference in New Issue
Block a user