Class: Azuki::CLI
Class Method Summary collapse
Methods included from Helpers
action, ask, confirm, confirm_billing, confirm_command, create_git_remote, deprecate, display, display_header, display_object, display_row, display_table, error, error_with_failure, error_with_failure=, extended, extended_into, fail, format_bytes, format_date, format_error, format_with_bang, get_terminal_environment, git, has_git?, home_directory, hprint, hputs, included, included_into, json_decode, json_encode, launchy, line_formatter, longest, output_with_bang, quantify, redisplay, retry_on_exception, run_command, running_on_a_mac?, running_on_windows?, set_buffer, shell, spinner, status, string_distance, styled_array, styled_error, styled_hash, styled_header, suggestion, time_ago, truncate, with_tty
Class Method Details
.start(*args) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/azuki/cli.rb', line 18 def self.start(*args) begin if $stdin.isatty $stdin.sync = true end if $stdout.isatty $stdout.sync = true end command = args.shift.strip rescue "help" Azuki::Command.load Azuki::Command.run(command, args) rescue Interrupt `stty icanon echo` error("Command cancelled.") rescue => error styled_error(error) exit(1) end end |