diff options
author | John Ankarstrom <john@ankarstrom.se> | 2021-07-02 15:45:11 +0200 |
---|---|---|
committer | John Ankarstrom <john@ankarstrom.se> | 2021-07-02 15:45:11 +0200 |
commit | e48fa664f95ca7d34c824870528cfa3fc8687394 (patch) | |
tree | 41d1c43038298983b16dbe894dd98b90249a2018 /git-s | |
parent | 5d4777313eed7a4c777fea2bd316ff233fb59af1 (diff) | |
download | xutil-e48fa664f95ca7d34c824870528cfa3fc8687394.tar.gz |
git-s: Change output format
Diffstat (limited to 'git-s')
-rwxr-xr-x | git-s | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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"; } |