diff --git a/ghi b/ghi index 911403f..6016748 100755 --- a/ghi +++ b/ghi @@ -733,7 +733,7 @@ module GHI (i['repo'].to_s.rjust(rmax) if i['repo']), format_number(n.to_s.rjust(nmax)), truncate(title, l), - format_labels(labels), + (format_labels(labels) unless assigns[:dont_print_labels]), (fg(:green) { m['title'] } if m), (fg('aaaaaa') { c } unless c == 0), (fg('aaaaaa') { '↑' } if p), @@ -953,8 +953,8 @@ EOF def format_comment_editor issue, comment = nil message = ERB.new(<', %w(created updated comments), {'c'=>'created','u'=>'updated','m'=>'comments'}, diff --git a/lib/ghi/commands/list.rb b/lib/ghi/commands/list.rb index 6f002d9..e3ea107 100644 --- a/lib/ghi/commands/list.rb +++ b/lib/ghi/commands/list.rb @@ -33,6 +33,11 @@ def options ) do |labels| (assigns[:exclude_labels] ||= []).concat labels end + opts.on( + '--no-labels', 'do not print labels' + ) do + assigns[:dont_print_labels] = true + end opts.on( '-S', '--sort ', %w(created updated comments), {'c'=>'created','u'=>'updated','m'=>'comments'}, diff --git a/lib/ghi/formatting.rb b/lib/ghi/formatting.rb index 444231d..5b0a1be 100644 --- a/lib/ghi/formatting.rb +++ b/lib/ghi/formatting.rb @@ -193,7 +193,7 @@ def format_issues issues, include_repo (i['repo'].to_s.rjust(rmax) if i['repo']), format_number(n.to_s.rjust(nmax)), truncate(title, l), - format_labels(labels), + (format_labels(labels) unless assigns[:dont_print_labels]), (fg(:green) { m['title'] } if m), (fg('aaaaaa') { c } unless c == 0), (fg('aaaaaa') { '↑' } if p), @@ -413,8 +413,8 @@ def format_milestone_editor milestone = nil def format_comment_editor issue, comment = nil message = ERB.new(<