class Guard::CLI


instead.
‘bin/guard`. Do not put any logic in here, create a class and delegate
This is the main interface to Guard that is called by the Guard binary<br><br>(github.com/wycats/thor).
Facade for the Guard command line interface managed by

def self.help(shell, subcommand = false)

def self.help(shell, subcommand = false)
  super
  command_help(shell, default_task)
end

def init(*plugin_names)

Parameters:
  • plugin_names (Array) -- the name of the Guard plugins to

Other tags:
    See: Guard::Guardfile.initialize_all_templates -
    See: Guard::Guardfile.initialize_template -
def init(*plugin_names)
  env = Cli::Environments::Valid.new(options)
  exitcode = env.initialize_guardfile(plugin_names)
  exit(exitcode)
end

def list

Other tags:
    See: Guard::DslDescriber.list -
def list
  Cli::Environments::EvaluateOnly.new(options).evaluate
  DslDescriber.new.list
end

def notifiers

Other tags:
    See: Guard::DslDescriber.notifiers -
def notifiers
  Cli::Environments::EvaluateOnly.new(options).evaluate
  # TODO: pass the data directly to the notifiers?
  DslDescriber.new.notifiers
end

def show

Other tags:
    See: Guard::DslDescriber.show -
def show
  Cli::Environments::EvaluateOnly.new(options).evaluate
  DslDescriber.new.show
end

def start

Other tags:
    See: Guard.start -
def start
  if defined?(JRUBY_VERSION)
    unless options[:no_interactions]
      abort "\nSorry, JRuby and interactive mode are incompatible.\n"\
        "As a workaround, use the '-i' option instead.\n\n"\
        "More info: \n"\
        " * https://github.com/guard/guard/issues/754\n"\
        " * https://github.com/jruby/jruby/issues/2383\n\n"
    end
  end
  exit(Cli::Environments::Valid.new(options).start_guard)
end

def version

Other tags:
    See: Guard::VERSION -
def version
  $stdout.puts "Guard version #{ VERSION }"
end