robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
82b02ae2f2
master
1#!/bin/sh 2# Shell script to start Vim with less.vim. 3# Read stdin if no arguments were given and stdin was redirected. 4 5if test -t 1;then 6if test $ # = 0;then 7if test -t 0;then 8echo "Missing filename" 1 >&2 9exit 10fi 11nvim --cmd 'let no_plugin_maps = 1' -c 'runtime! scripts/less.vim' - 12else 13nvim --cmd 'let no_plugin_maps = 1' -c 'runtime! scripts/less.vim' " $ @" 14fi 15else 16# Output is not a terminal, cat arguments or stdin 17if test $ # = 0;then 18if test -t 0;then 19echo "Missing filename" 1 >&2 20exit 21fi 22cat 23else 24cat " $ @" 25fi 26fi