aboutsummaryrefslogtreecommitdiff
path: root/sh
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-04-07 12:38:45 +1200
committerTom Ryder <tom@sanctum.geek.nz>2017-04-07 12:38:45 +1200
commitee8f9287bf3416c06ee8b5179a672b400058d236 (patch)
treef3cbd71a92b36fe02933bdad679cd7099c6ca6ad /sh
parentfb2b15e272e7c29348f1d23bd717d52cd6b69660 (diff)
parentfd705194e5b1eb2f5c07b196f4be83a74bfe8fa1 (diff)
downloaddotfiles-ee8f9287bf3416c06ee8b5179a672b400058d236.tar.gz
Merge branch 'master' into port/bsd/freebsd
Diffstat (limited to 'sh')
-rw-r--r--sh/shrc.d/ls.sh6
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 ] &&