]> arthur.barton.de Git - ax-zsh.git/commitdiff
editor_select: Alias "zshrnv" in non-login shells, too!
authorAlexander Barton <alex@barton.de>
Sun, 21 Mar 2021 16:11:01 +0000 (17:11 +0100)
committerAlexander Barton <alex@barton.de>
Sun, 21 Mar 2021 16:40:56 +0000 (17:40 +0100)
plugins/editor_select/editor_select.zprofile
plugins/editor_select/editor_select.zshrc [new file with mode: 0644]

index 982d9b8e7f83837b12e3241a9206c8604a9074a1..3aecb6ff01e64efbb84bd18ba8cb67a6cb8dc7cd 100644 (file)
@@ -29,7 +29,4 @@ case "$EDITOR:t" in
                ;;
 esac
 
-if [[ -n "$EDITOR" ]]; then
-       export EDITOR
-       alias zshenv="$EDITOR ~/.zshenv"
-fi
+[[ -n "$EDITOR" ]] && export EDITOR
diff --git a/plugins/editor_select/editor_select.zshrc b/plugins/editor_select/editor_select.zshrc
new file mode 100644 (file)
index 0000000..c18070f
--- /dev/null
@@ -0,0 +1,4 @@
+# AX-ZSH: Alex' Modular ZSH Configuration
+# editor_select.zshrc: Setup $EDITOR for the "best" available editor
+
+[[ -n "$EDITOR" ]] && alias zshenv="$EDITOR ~/.zshenv"