From a6a88fd424ea806ce89ce6b2aa1e0d6664b918de Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Thu, 24 Nov 2016 21:47:18 +0100 Subject: [PATCH] Add setting for less --- zsh/zshrc.org | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/zsh/zshrc.org b/zsh/zshrc.org index 7f7bd00..15d7138 100644 --- a/zsh/zshrc.org +++ b/zsh/zshrc.org @@ -128,3 +128,21 @@ Autoload any ZSH function from =$HOME/.zsh/functions=. autoload -Uz compinit compinit #+END_SRC + +* Less + + I use a terminal that's always 80 columns wide. This means that a + lot of output doesn't fit on a single line. I use the less command a + lot to look at output that's too big and wide to view in my + terminal. The default doesn't make this any better though, so I use + these switches. Most of these I originally got from what git uses. + + #+BEGIN_SRC sh + export LESS="FXRSi" + #+END_SRC + + This causes less to immediately quit if there is no need to use a + pager (everything fits in a single screen) (=-F=). Doesn't clear the + screen when less is closed (=-X=). Handles ANSI colors (=-R=). Stops + long lines from wraping (=-S=). And makes searches case-insensitive + (=-i=).