summaryrefslogtreecommitdiff
path: root/v-editor.sh
diff options
context:
space:
mode:
Diffstat (limited to 'v-editor.sh')
-rw-r--r--v-editor.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/v-editor.sh b/v-editor.sh
new file mode 100644
index 0000000..ef6f0a1
--- /dev/null
+++ b/v-editor.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+(if [ -n "$DISPLAY" ]; then eval ${VISUAL:-$SELECTED_EDITOR} "$@"
+ else eval ${EDITOR:-$SELECTED_EDITOR} "$@"
+fi) || eval ${ALTERNATE_EDITOR:-false} "$@"
+
+