diff options
Diffstat (limited to 'sh')
-rw-r--r-- | sh/shrc.d/ls.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sh/shrc.d/ls.sh b/sh/shrc.d/ls.sh index 0fc6923a..05e7a06c 100644 --- a/sh/shrc.d/ls.sh +++ b/sh/shrc.d/ls.sh @@ -14,8 +14,10 @@ ls() { # -F to show trailing indicators of the filetype # -q to replace control chars with '?' - # -x to format entries across, not down - set -- -Fqx "$@" + set -- -Fq "$@" + + # If output is to a terminal, add -x to format entries across, not down + [ -t 1 ] && set -- -x "$@" # Add --block-size=K to always show the filesize in kibibytes [ -e "$HOME"/.cache/ls/block-size ] && |