diff --git a/profiles/develop/zsh/default.nix b/profiles/develop/zsh/default.nix index e0b5ea9e..9524ce73 100644 --- a/profiles/develop/zsh/default.nix +++ b/profiles/develop/zsh/default.nix @@ -98,6 +98,7 @@ in ripgrep = "${pkgs.ripgrep}"; man = "${pkgs.man}"; + exa = "${pkgs.exa}"; installPhase = let basename = "\${file##*/}"; diff --git a/profiles/develop/zsh/functions/exa b/profiles/develop/zsh/functions/exa new file mode 100644 index 00000000..60090afa --- /dev/null +++ b/profiles/develop/zsh/functions/exa @@ -0,0 +1,6 @@ +# pipe exa into PAGER with colors +if [[ -t 1 && -n $PAGER ]]; then + @exa@/bin/exa --color always $@ | $PAGER +else + @exa@/bin/exa $@ +fi diff --git a/profiles/develop/zsh/functions/rg b/profiles/develop/zsh/functions/rg index 8ba77659..61e326e9 100644 --- a/profiles/develop/zsh/functions/rg +++ b/profiles/develop/zsh/functions/rg @@ -1,4 +1,4 @@ -# pipe rg into less with colors +# pipe rg into PAGER with colors if [[ -t 1 && -n $PAGER ]]; then @ripgrep@/bin/rg -p $@ | $PAGER else