diff options
author | Bram Moolenaar <Bram@vim.org> | 2008-06-24 20:39:31 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2008-06-24 20:39:31 +0000 |
commit | a7241f5f19fd0865ce697939c347a8c88fb507d5 (patch) | |
tree | e1f1c07fe74094539286be048cc3306f6aedb0bc /runtime/macros | |
parent | f233048a129fa7a3b89e064078435181d6421da5 (diff) | |
download | vim-git-a7241f5f19fd0865ce697939c347a8c88fb507d5.tar.gz |
updated for version 7.2a
Diffstat (limited to 'runtime/macros')
-rwxr-xr-x | runtime/macros/less.sh | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/runtime/macros/less.sh b/runtime/macros/less.sh index 256936b5e..484c714ce 100755 --- a/runtime/macros/less.sh +++ b/runtime/macros/less.sh @@ -2,8 +2,17 @@ # Shell script to start Vim with less.vim. # Read stdin if no arguments were given. -if test $# = 0; then - vim --cmd 'let no_plugin_maps = 1' -c 'runtime! macros/less.vim' - +if test -t 1; then + if test $# = 0; then + vim --cmd 'let no_plugin_maps = 1' -c 'runtime! macros/less.vim' - + else + vim --cmd 'let no_plugin_maps = 1' -c 'runtime! macros/less.vim' "$@" + fi else - vim --cmd 'let no_plugin_maps = 1' -c 'runtime! macros/less.vim' "$@" + # Output is not a terminal, cat arguments or stdin + if test $# = 0; then + cat + else + cat "$@" + fi fi |