all repos — nixfiles @ b848b32038a3863fb0b745b7505bfc9ba75f9e69

System and user configuration, managed by nix and home-manager

shell: enable nice colours with macOS's default `ls`

Alan Pearce
commit

b848b32038a3863fb0b745b7505bfc9ba75f9e69

parent

334c968d83c5353bb80baccfb9f8d1c2daa3703c

1 file changed, 3 insertions(+), 3 deletions(-)

changed files
M user/settings/shell.nix → user/settings/shell.nix
@@ -6,10 +6,10 @@ ...
}: let inherit (pkgs) stdenv; - ls-use-coreutils = true; + ls-use-coreutils = false; lsOptions = if stdenv.isDarwin && !ls-use-coreutils then - "--color=auto -p" + "-p" else "--color=auto -v --group-directories-first --hyperlink=auto"; lsIsoDate = lib.optionalString (stdenv.isDarwin && !ls-use-coreutils) "--time-style=long-iso";
@@ -17,7 +17,7 @@ in
{ home = { shellAliases = { - ls = "command ${if stdenv.isDarwin && ls-use-coreutils then "gls" else "ls"} ${lsOptions} -hF"; + ls = "ls ${lsOptions} -hF"; l = "ls -Bp"; l1 = "ls -1"; la = "ls -hA";