From 5fb8b0b1fa17256f6555c1228268d0b8ad5270b8 Mon Sep 17 00:00:00 2001 From: Timothy DeHerrera Date: Wed, 18 Dec 2019 00:00:44 -0700 Subject: [PATCH] develop#zsh: send configuration.nix configurations COPYING flake.lock flake.nix lib local pkgs profiles README.md secrets users output to PAGER --- profiles/develop/zsh/default.nix | 1 + profiles/develop/zsh/functions/exa | 6 ++++++ profiles/develop/zsh/functions/rg | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 profiles/develop/zsh/functions/exa diff --git a/profiles/develop/zsh/default.nix b/profiles/develop/zsh/default.nix index e0b5ea9..9524ce7 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 0000000..60090af --- /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 8ba7765..61e326e 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