prevent dumping output to screen on quit
- Save
bat_pager
script to$HOME/bin
#!/usr/bin/env bash less -r "$@"
- Make it executable:
chmod +x $HOME/bin/bat_pager
- in
$HOME/.bashrc
if [[ -s "$HOME/bin/bat_pager" ]]; then export BAT_PAGER="$HOME/bin/bat_pager" fi