7a6fb7d58a69ad8f1bfd29df3590bbf2bf35c352
commit 7a6fb7d58a69ad8f1bfd29df3590bbf2bf35c352
Author: spesk1 <spesk@pm.me>
Date: Sun Jul 7 10:44:55 2019 -0400

Playing around with --view output a bit for readability

diff --git a/sg b/sg
index c733798..99a38e4 100755
--- a/sg
+++ b/sg
@@ -303,15 +303,17 @@ if ( defined $args{'knock'} && scalar keys %args == 2 ) {
# TODO: This sub could be more concise with a sub to print array refs
if ( defined $args{'view'} ) {
my ( $untrackedRef, $modifiedRef, $addedRef, $deletedRef ) = returnState($logger);
- my $refs = shellex("$gitCmd show-ref",$logger);
+ #my $refs = shellex("$gitCmd show-ref",$logger);
my $branch = shellex("$gitCmd show-branch",$logger);
my $name = shellex("$gitCmd config --get user.name",$logger);
chomp $name;
my $email = shellex("$gitCmd config --get user.email",$logger);
chomp $email;
color_print("-->Username: $name\n-->Email: $email\n","BLUE");
- color_print("On [branch] @ commit: $branch\n","GREEN");
- print "$refs\n";
+ print "Branches:\n";
+ color_print("$branch\n","GREEN");
+ #print "$refs\n";
+ print "Files:\n";
my $swpWarning = "\t# Likely a Vi .swp file";

my $untrackedTotal = scalar @$untrackedRef;