bin/shaft in shaft-0.7 vs bin/shaft in shaft-0.8

- old
+ new

@@ -17,24 +17,36 @@ method_options %w( short -s ) => :boolean def active active = get_active unless active.empty? if options[:short] - say active.keys.join(",") + say active.keys.join(" ") else say "Listing currently active tunnels:" print_table active end else say "No tunnels are currently active." unless options[:short] end end desc "all", "Lists all available tunnels" + method_options %w( short -s ) => :boolean def all - say "Listing all available tunnels:" tunnels = get_config.keys - print_in_columns tunnels + if options[:short] + say tunnels.join(' ') + else + say "Listing all available tunnels:" + print_in_columns tunnels + end + end + + desc "completions", "Prints setup code for Zsh completions" + def completions + fpath = File.expand_path File.join(File.dirname(__FILE__), '..', 'completions') + puts "fpath=(#{fpath} $fpath)" + puts "compinit" end desc "start [NAME]", "Starts a tunnel" method_options :name => :string def start(name)