X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=bin%2Fsup-tweak-labels;fp=bin%2Fsup-tweak-labels;h=90f6a57ddb0cbebd037f4a74dd1692a191de522e;hb=da1abd360e25011bdbe23b9194f926f29b8aef44;hp=eac300ebf866e90ef1f7ac1328713e87126331d6;hpb=57dea7ad93bb15491cd33281d933ca4ef6440e45;p=sup diff --git a/bin/sup-tweak-labels b/bin/sup-tweak-labels index eac300e..90f6a57 100755 --- a/bin/sup-tweak-labels +++ b/bin/sup-tweak-labels @@ -38,8 +38,8 @@ be seen by running "sup-add --help". Options: EOS - opt :add, "One or more labels (comma-separated) to add to every message from the specified sources", :type => String - opt :remove, "One or more labels (comma-separated) to remove from every message from the specified sources, if those labels are present", :type => String + opt :add, "One or more labels (comma-separated) to add to every message from the specified sources", :default => "" + opt :remove, "One or more labels (comma-separated) to remove from every message from the specified sources, if those labels are present", :default => "" opt :query, "A Sup search query", :type => String text < {#{m.labels.join ','}}" if opts[:verbose] + puts "#{m.id}: {#{old_labels.to_a.join ','}} => {#{m.labels.to_a.join ','}}" if opts[:verbose] puts if opts[:very_verbose] - index.sync_message m unless opts[:dry_run] + index.update_message_state m unless opts[:dry_run] end if Time.now - last_info_time > 60