Created
December 19, 2012 04:41
-
-
Save munky69rock/4334419 to your computer and use it in GitHub Desktop.
vim pager
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -u | |
set -e | |
# origin: http://www.songmu.jp/riji/archives/2012/05/post_379.html | |
# check: http://d.hatena.ne.jp/masudaK/20120223/1330006586 | |
if [[ -p /dev/stdin ]];then | |
tr -d "\r" | vim -R - | |
else | |
cat <<HELP | |
$0 | |
Description: | |
pager with vim | |
Usage: | |
[standard input] | $0 | |
Expample: | |
svn diff -rhead [source] | $0 | |
HELP | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment