summaryrefslogtreecommitdiff
path: root/.config/login.d/10_selected-editor.sh
diff options
context:
space:
mode:
Diffstat (limited to '.config/login.d/10_selected-editor.sh')
-rw-r--r--.config/login.d/10_selected-editor.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/.config/login.d/10_selected-editor.sh b/.config/login.d/10_selected-editor.sh
new file mode 100644
index 0000000..f176b8a
--- /dev/null
+++ b/.config/login.d/10_selected-editor.sh
@@ -0,0 +1,7 @@
+if [[ -f "$HOME/.selected_editor" ]]; then
+ . "$HOME/.selected_editor"
+ export SELECTED_EDITOR
+ export ALTERNATE_EDITOR
+ export EDITOR="${EDITOR:-$SELECTED_EDITOR}"
+ export VISUAL="${VISUAL:-$SELECTED_EDITOR}"
+fi