From: PHO Date: Fri, 24 Oct 2014 03:45:19 +0000 (+0900) Subject: Auto commit by The Sugar System. X-Git-Url: https://git.cielonegro.org/gitweb.cgi?a=commitdiff_plain;h=4568d43507bcd9e0964c72e6ea565eea65a92829;p=sugar.git Auto commit by The Sugar System. --- diff --git a/dot-files/_zshrc b/dot-files/_zshrc index 13e764d..ff20eda 100644 --- a/dot-files/_zshrc +++ b/dot-files/_zshrc @@ -186,6 +186,22 @@ HISTFILE="$HOME/.zhistory" HISTSIZE=6000000 SAVEHIST=6000000 +function lv() { + local -a lv_cmd + + if whence -p lv >/dev/null; then + lv_cmd=("lv") + elif which less >&/dev/null; then + lv_cmd=("less") + elif which more >&/dev/null; then + lv_cmd=("more") + else + echo >&2 "$0: no pager commands are found" + fi + + command "${lv_cmd[@]}" "$@" +} + alias -g L="| $PAGER" alias -g G="| grep" alias -g H="| head"