aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/data/scripts/util
diff options
context:
space:
mode:
authorGravatar Ben Boeckel <MathStuf@gmail.com>2010-08-21 11:11:13 -0400
committerGravatar Ben Boeckel <MathStuf@gmail.com>2010-10-02 11:56:29 -0400
commit6229a4eff9a4e9ac38c790d37ac05fd2ea0a6a7b (patch)
tree4990d74b1df2a0dc7ccc7ca0a19b8f254a27f689 /examples/data/scripts/util
parent8526a0dd73661ae0a5d1cf950ea5e5f63b5b08c5 (diff)
Add editor utility script
Diffstat (limited to 'examples/data/scripts/util')
-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..a152ebd
--- /dev/null
+++ b/examples/data/scripts/util/editor.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+# Editor selection
+
+if [ "x$VTERM" = "x" ]; 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