From e48fa664f95ca7d34c824870528cfa3fc8687394 Mon Sep 17 00:00:00 2001 From: John Ankarstrom Date: Fri, 2 Jul 2021 15:45:11 +0200 Subject: git-s: Change output format --- git-s | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/git-s b/git-s index cc560d9..faf55ff 100755 --- a/git-s +++ b/git-s @@ -6,12 +6,12 @@ git status -s | perl -ne ' push @{$x{$1}}, $2 if /^(.). (.*)/; push @{$y{$1}}, $2 if /^.(.) (.*)/; END { - delete $x{"?"}; - for ([">" => \%x], ["." => \%y]) { + delete $x{"?"}; delete $x{" "}; delete $y{" "}; + for (["index" => \%x], ["tree" => \%y]) { ($n, $h) = @$_; + print "$n:" if values %$h; for (sort keys %$h) { - next if $_ eq " "; - print "$n$_"; + print " $_ "; print " $_" for @{$h->{$_}}; print "\n"; } -- cgit v1.2.3