]> rtime.felk.cvut.cz Git - sojka/duhome.git/commitdiff
Produce nicer aligned output
authorMichal Sojka <michal.sojka@cvut.cz>
Fri, 27 Jul 2018 13:08:22 +0000 (15:08 +0200)
committerMichal Sojka <michal.sojka@cvut.cz>
Fri, 27 Jul 2018 13:08:22 +0000 (15:08 +0200)
duhome

diff --git a/duhome b/duhome
index 0102e98ec98012efc9339cb82eeb6fa63099bd51..588f6e4d5dbc3b09555dbf326a232eaebadea9e5 100755 (executable)
--- a/duhome
+++ b/duhome
@@ -28,10 +28,9 @@ case "$1" in
        ;;
     status)
        cd $DATA
-       grep . *|sort -h -k2 -t:
        git ls-files --with-tree=HEAD | while read f; do
-           echo "$f:$(git show "HEAD:$f")"
-       done | sort -h -k2 -t:
+           printf "%-8s\t%s\n" "$f" "$(git show "HEAD:$f")"
+       done | sort -h -k2
        ;;
     log)
        cd $DATA