"editor_select": (Re-)define "zshrc" alias using $EDITOR
authorAlexander Barton <alex@barton.de>
Thu, 2 Apr 2015 15:52:42 +0000 (17:52 +0200)
committerAlexander Barton <alex@barton.de>
Thu, 2 Apr 2015 15:52:42 +0000 (17:52 +0200)
plugins/editor_select/editor_select.plugin.zsh

index 423b2dcd23a3022e8ea7e4f5c9dbc0e1b9563420..ed20a0258af29d4a259a409011924cd93037de70 100644 (file)
@@ -1,5 +1,5 @@
 # editor-select.plugin.zsh
-# 2015-03-27, alex@barton.de
+# 2015-04-02, alex@barton.de
 
 if [ -z "$EDITOR" ]; then
        # Check "mate"
@@ -21,4 +21,7 @@ if [ -z "$EDITOR" ]; then
                fi
        fi
 fi
-[ -n "$EDITOR" ] && export EDITOR
+if [ -n "$EDITOR" ]; then
+       export EDITOR
+       alias zshrc="$EDITOR ~/.zshrc"
+fi