From 194ab3b92009170ada346d76287fb8c3dcc75f04 Mon Sep 17 00:00:00 2001 From: bretello Date: Sat, 7 Dec 2019 22:28:16 +0100 Subject: [PATCH] add bat, bat options, pager options --- brethil_dotfile.sh | 10 +++++++++- install.sh | 3 ++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/brethil_dotfile.sh b/brethil_dotfile.sh index 2e75daa..5815de1 100755 --- a/brethil_dotfile.sh +++ b/brethil_dotfile.sh @@ -37,13 +37,21 @@ antigen apply # Enable zsh autocorrection setopt CORRECT_ALL -# Misc environment variables +## Misc environment variables # https://www.xkcd.com/378/ export EDITOR="vim" export HISTSIZE=100000 export LANG=en_US.UTF-8 +if [[ $(command -v bat) ]]; then + alias cat=bat + export BAT_PAGER="less -RF" + export PAGER=bat +else + # less options + export LESS='-R-j12' # displays 12 lines before search results with / and ? +fi if [[ $SSH_CLIENT ]]; then export SSH_AUTH_SOCK=$HOME/.ssh/ssh_auth_sock diff --git a/install.sh b/install.sh index 447e437..5afcb95 100755 --- a/install.sh +++ b/install.sh @@ -16,7 +16,8 @@ DOTFILES=$PWD # pv: pipe view, monitor the progress of data through a pipe # byobu: tmux wrapper # htop: like top, but bettah -PACKAGES="vim zsh antigen git grc ccze bmon mtr pv tmux byobu htop" # TODO: add bat +# bat: a cat clone on wings +PACKAGES="vim zsh antigen git grc ccze bmon mtr pv tmux byobu htop bat" function setup_git { # set up some git stuff