aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/data/scripts/util/editor.sh
diff options
context:
space:
mode:
Diffstat (limited to 'examples/data/scripts/util/editor.sh')
-rw-r--r--examples/data/scripts/util/editor.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/examples/data/scripts/util/editor.sh b/examples/data/scripts/util/editor.sh
new file mode 100644
index 0000000..1969769
--- /dev/null
+++ b/examples/data/scripts/util/editor.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+# Editor selection
+
+if [ -z "$VTERM" ]; then
+ VTERM="xterm"
+fi
+
+UZBL_EDITOR="$VISUAL"
+if [ -z "$UZBL_EDITOR" ]; then
+ if [ -z "$EDITOR" ]; then
+ UZBL_EDITOR="$VTERM -e vim"
+ else
+ UZBL_EDITOR="$VTERM -e $EDITOR"
+ fi
+fi