diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-03-24 14:02:59 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-03-24 14:02:59 +1300 |
commit | 2e28d5a885608fddd1e0b7464ba3c9582a9e8ca4 (patch) | |
tree | f2ac4ae683f7dd4cfa416813bf93838df0de256d /bin/exm | |
parent | Remove double-up colon check in path() (diff) | |
download | dotfiles-2e28d5a885608fddd1e0b7464ba3c9582a9e8ca4.tar.gz dotfiles-2e28d5a885608fddd1e0b7464ba3c9582a9e8ca4.zip |
Add exm(1df) to work around Vim's screen-clearing
Diffstat (limited to 'bin/exm')
-rwxr-xr-x | bin/exm | 10 |
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 "$@" |