class Sutty::Cli::Command
Public Instance Methods
The external commands runner
@see www.rubydoc.info/gems/tty-command
@api public
# File lib/sutty/cli/command.rb 27 def command(**options) 28 require 'tty-command' 29 TTY::Command.new(options) 30 end
The cursor movement
@see www.rubydoc.info/gems/tty-cursor
@api public
# File lib/sutty/cli/command.rb 37 def cursor 38 require 'tty-cursor' 39 TTY::Cursor 40 end
Open a file or text in the user's preferred editor
@see www.rubydoc.info/gems/tty-editor
@api public
# File lib/sutty/cli/command.rb 47 def editor 48 require 'tty-editor' 49 TTY::Editor 50 end
Check if executable exists
@see www.rubydoc.info/gems/tty-which
@api public
# File lib/sutty/cli/command.rb 117 def exec_exist?(*args) 118 require 'tty-which' 119 TTY::Which.exist?(*args) 120 end
Execute this command
@api public
# File lib/sutty/cli/command.rb 15 def execute(*) 16 raise( 17 NotImplementedError, 18 "#{self.class}##{__method__} must be implemented" 19 ) 20 end
File manipulation utility methods
@see www.rubydoc.info/gems/tty-file
@api public
# File lib/sutty/cli/command.rb 57 def generator 58 require 'tty-file' 59 TTY::File 60 end
Terminal output paging
@see www.rubydoc.info/gems/tty-pager
@api public
# File lib/sutty/cli/command.rb 67 def pager(**options) 68 require 'tty-pager' 69 TTY::Pager.new(options) 70 end
Terminal platform and OS properties
@see www.rubydoc.info/gems/tty-pager
@api public
# File lib/sutty/cli/command.rb 77 def platform 78 require 'tty-platform' 79 TTY::Platform.new 80 end
The interactive prompt
@see www.rubydoc.info/gems/tty-prompt
@api public
# File lib/sutty/cli/command.rb 87 def prompt(**options) 88 require 'tty-prompt' 89 TTY::Prompt.new(options) 90 end
Get terminal screen properties
@see www.rubydoc.info/gems/tty-screen
@api public
# File lib/sutty/cli/command.rb 97 def screen 98 require 'tty-screen' 99 TTY::Screen 100 end
The unix which utility
@see www.rubydoc.info/gems/tty-which
@api public
# File lib/sutty/cli/command.rb 107 def which(*args) 108 require 'tty-which' 109 TTY::Which.which(*args) 110 end