From 2e28d5a885608fddd1e0b7464ba3c9582a9e8ca4 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Fri, 24 Mar 2017 14:02:59 +1300 Subject: Add exm(1df) to work around Vim's screen-clearing --- bin/exm | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 bin/exm (limited to 'bin') 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 "$@" -- cgit v1.2.3