Enable `bat`
Alan Pearce alan@alanpearce.eu
Fri, 16 Jun 2023 17:03:59 +0200
2 files changed, 16 insertions(+), 0 deletions(-)
M user/settings/base.nix → user/settings/base.nix
@@ -13,6 +13,7 @@ html.enable = true; }; home.sessionVariables = { EMAIL = "alan@alanpearce.eu"; + MANPAGER = "sh -c 'col -bx | bat -l man -p'"; }; xdg = { enable = true; @@ -36,6 +37,16 @@ tree_view = 1; hide_kernel_threads = 1; hide_userland_threads = 1; }; + }; + programs.bat = { + enable = true; + extraPackages = with pkgs.bat-extras; [ + batdiff + batman + batgrep + batpipe + prettybat + ]; }; home.packages = with pkgs; [
M user/zsh/zshrc → user/zsh/zshrc
@@ -169,3 +169,8 @@ tere() { local result=$(command tere "$@") [ -n "$result" ] && cd -- "$result" } + +alias bathelp='bat --plain --language=help' +help() { + "$@" --help 2>&1 | bathelp +}