diff options
Diffstat (limited to 'home/shell-utils')
-rw-r--r-- | home/shell-utils/default.nix | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/home/shell-utils/default.nix b/home/shell-utils/default.nix index 0207d40..c3ea75e 100644 --- a/home/shell-utils/default.nix +++ b/home/shell-utils/default.nix @@ -17,5 +17,16 @@ in { pbv trash disable-sleep + + # Unlike the `stat` command on Linux (from coreutils or whatever), OSX's + # `stat` does not automatically use the nicer format when stdout is a + # sterminal. + (pkgs.writeShellScriptBin "stat" '' + if [ -t 1 ]; then + /usr/bin/stat -x "$@" + else + /usr/bin/stat "$@" + fi + '') ]; } |