make beaty output
This commit is contained in:
parent
c8d0aa91e9
commit
1eca440f02
@ -4,12 +4,14 @@ repos_dirs = [""]
|
||||
|
||||
def check_repo(repo_path : String)
|
||||
repo_name = repo_path.split("/")[-1]
|
||||
ahead_count = `git -C #{repo_path} status | grep -i "Your branch" | grep -Eo "[0-9]"`
|
||||
ahead_count = `git -C #{repo_path} status | grep -i "Your branch" | grep -Eo "[0-9]"`.chomp
|
||||
|
||||
if !ahead_count.empty?
|
||||
print "* #{ahead_count}\t".colorize(:red).mode(:bold)
|
||||
print repo_name.colorize(:yellow)
|
||||
print " " * (25 - repo_name.size)
|
||||
print ahead_count.to_s.colorize(:green).mode(:bold)
|
||||
print " ["
|
||||
print repo_path.colorize(:light_magenta)
|
||||
puts "]"
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user