Do not use exa when piping
diff --git a/src/apps/personal/ls.nix b/src/apps/personal/ls.nix
index c011586..5811b55 100644
--- a/src/apps/personal/ls.nix
+++ b/src/apps/personal/ls.nix
@@ -4,8 +4,12 @@
];
programs.zsh.initExtra = ''
- function ls {
- ${pkgs.exa}/bin/exa --icons -lghF --git --group-directories-first --color always "$@" | less --quit-if-one-screen
+ function ls {
+ if [ -t 1 ] ; then
+ ${pkgs.exa}/bin/exa --icons -lghF --git --group-directories-first --color always "$@" | less --quit-if-one-screen
+ else
+ ${pkgs.coreutils}/bin/ls "$@"
+ fi
}
'';