aboutsummaryrefslogtreecommitdiff
path: root/bin/exm
diff options
context:
space:
mode:
Diffstat (limited to 'bin/exm')
-rwxr-xr-xbin/exm10
1 files changed, 10 insertions, 0 deletions
diff --git a/bin/exm b/bin/exm
new file mode 100755
index 00000000..cfae82d4
--- /dev/null
+++ b/bin/exm
@@ -0,0 +1,10 @@
+#!/bin/sh
+# If input is a terminal and ex(1) is the Vim version, force it to use a dumb
+# terminal so it doesn't clear the screen
+if [ -t 0 ] ; then
+ ver=$(ex --version | sed '1{s/ .*//;q}') 2>/dev/null
+ case $ver in
+ VIM) set -- -T builtin_dumb "$@" ;;
+ esac
+fi
+exec ex "$@"