class Bashly::Commands::Shell
Public Instance Methods
run()
click to toggle source
# File lib/bashly/commands/shell.rb, line 10 def run ENV['BASHLY_SHELL'] = '1' terminal.start end
Private Instance Methods
autocomplete()
click to toggle source
# File lib/bashly/commands/shell.rb, line 35 def autocomplete @autocomplete ||= %w[help version] + runner.commands.keys end
runner()
click to toggle source
# File lib/bashly/commands/shell.rb, line 31 def runner @runner ||= Bashly::CLI.runner end
terminal()
click to toggle source
# File lib/bashly/commands/shell.rb, line 17 def terminal @terminal ||= begin terminal = MisterBin::Terminal.new runner, { autocomplete: autocomplete, show_usage: true, prompt: "\n$> bashly ", } terminal.on('help') { runner.run %w[--help] } terminal.on('version') { runner.run %w[--version] } terminal end end