]> gitweb @ CieloNegro.org - sugar.git/commitdiff
Auto commit by The Sugar System.
authorPHO <pho@cielonegro.org>
Fri, 24 Oct 2014 03:45:19 +0000 (12:45 +0900)
committerPHO <pho@cielonegro.org>
Fri, 24 Oct 2014 03:45:19 +0000 (12:45 +0900)
dot-files/_zshrc

index 13e764d270eeb822aefe67496329a4345ce2dc0f..ff20eda1586377671450f4652876864991c05294 100644 (file)
@@ -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"