sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit 2b215c694d8cbb6105529b93c887895fdb928544
parent 0aca67e95d3c055b56e02399bbcb830d772d6c62
Author: Gaute Hope <eg@gaute.vetsj.com>
Date:   Mon, 14 Dec 2015 13:12:09 +0100

fix #499: require util and use @cli.chose

Diffstat:
M bin/sup-add | 4 ++--
M bin/sup-config | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/bin/sup-add b/bin/sup-add
@@ -5,7 +5,7 @@ $:.unshift File.join(File.dirname(__FILE__), *%w[.. lib])
 require 'uri'
 require 'trollop'
 require "sup"
-require 'sup/utils/axe'
+require 'sup/util/axe'
 
 $opts = Trollop::options do
   version "sup-add (sup #{Redwood::VERSION})"
@@ -57,7 +57,7 @@ def get_login_info uri, sources
       end
     else
       @cli.say "Would you like to use the same account as for a previous source for #{uri}?"
-      choose do |menu|
+      @cli.choose do |menu|
         accounts.each do |host, olduser, oldpw|
           menu.choice("Use the account info for #{olduser}@#{host}") { username, password = olduser, oldpw }
         end
diff --git a/bin/sup-config b/bin/sup-config
@@ -29,7 +29,7 @@ def add_source
   type = nil
 
   @cli.say "Ok, adding a new source."
-  choose do |menu|
+  @cli.choose do |menu|
     menu.prompt = "What type of mail source is it? "
     menu.choice("mbox file") { type = :mbox }
     menu.choice("maildir directory") { type = :maildir }
@@ -155,7 +155,7 @@ until done
   end
 
   @cli.say "\n"
-  choose do |menu|
+  @cli.choose do |menu|
     menu.prompt = "Your wish? "
     menu.choice("Add a new source.") { add_source }
     menu.choice("Done adding sources!") { done = true }
@@ -174,7 +174,7 @@ else
   # source.
   have_sup_sent = false
 
-  choose do |menu|
+  @cli.choose do |menu|
     menu.prompt = "Store my sent mail in? "
 
     menu.choice('Default (an mbox in ~/.sup, aka sup://sent)') { $config[:sent_source] = 'sup://sent'} unless have_sup_sent