From 6229a4eff9a4e9ac38c790d37ac05fd2ea0a6a7b Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Sat, 21 Aug 2010 11:11:13 -0400 Subject: Add editor utility script --- examples/data/scripts/util/editor.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 examples/data/scripts/util/editor.sh (limited to 'examples/data/scripts/util') 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 -- cgit v1.2.3