From 00803b1a0b2a302a84871a05ae2abbdfe7f01a5c Mon Sep 17 00:00:00 2001 From: Alexey Alekhin Date: Wed, 23 Aug 2017 03:23:33 +0200 Subject: brew cask search without query just outputs all available cask tokens --- Library/Homebrew/cask/lib/hbc/cli/search.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Library') diff --git a/Library/Homebrew/cask/lib/hbc/cli/search.rb b/Library/Homebrew/cask/lib/hbc/cli/search.rb index e89dced92..42be4592a 100644 --- a/Library/Homebrew/cask/lib/hbc/cli/search.rb +++ b/Library/Homebrew/cask/lib/hbc/cli/search.rb @@ -2,8 +2,12 @@ module Hbc class CLI class Search < AbstractCommand def run - results = self.class.search(*args) - self.class.render_results(*results) + if args.empty? + puts Formatter.columns(CLI.nice_listing(Hbc.all_tokens)) + else + results = self.class.search(*args) + self.class.render_results(*results) + end end def self.extract_regexp(string) -- cgit v1.2.3