view runtime/macros/less.sh @ 12952:7fd105bfe992 v8.0.1352

patch 8.0.1352: dead URLs in the help go unnoticed commit https://github.com/vim/vim/commit/f38c86eb6b665d9fcd3d232820a48198eccac376 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Nov 28 14:19:07 2017 +0100 patch 8.0.1352: dead URLs in the help go unnoticed Problem: Dead URLs in the help go unnoticed. Solution: Add a script to check URLs in the help files. (Christian Brabandt)
author Christian Brabandt <cb@256bit.org>
date Tue, 28 Nov 2017 14:30:05 +0100
parents 1b584a6f446c
children
line wrap: on
line source

#!/bin/sh
# Shell script to start Vim with less.vim.
# Read stdin if no arguments were given and stdin was redirected.

if test -t 1; then
  if test $# = 0; then
    if test -t 0; then
      echo "Missing filename" 1>&2
      exit
    fi
    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
  # Output is not a terminal, cat arguments or stdin
  if test $# = 0; then
    if test -t 0; then
      echo "Missing filename" 1>&2
      exit
    fi
    cat
  else
    cat "$@"
  fi
fi