class Envo::CmdPath
Constants
- Name
Public Class Methods
parse_cli(args)
click to toggle source
# File lib/envo/cmd_path.rb, line 20 def self.parse_cli(args) CmdList.parse_cli(args.unshift('@path')) end
parse_script(tokens, opts)
click to toggle source
# File lib/envo/cmd_path.rb, line 24 def self.parse_script(tokens, opts) CmdList.parse_script(tokens.unshift('@path'), opts) end
register_cli_parser(parser)
click to toggle source
# File lib/envo/cmd_path.rb, line 11 def self.register_cli_parser(parser) parser.add_cmd(Name, ->(cmd, args) { parse_cli(args) }) parser.add_cmd('p', ->(cmd, args) { parse_cli(args) }) end
register_help(help)
click to toggle source
# File lib/envo/cmd_path.rb, line 4 def self.register_help(help) help.add_cmd "path <args>", <<~EOF shorthand for 'list @path <args>' shorthand: 'p' EOF end
register_script_parser(parser)
click to toggle source
# File lib/envo/cmd_path.rb, line 16 def self.register_script_parser(parser) parser.add_cmd(Name, ->(cmd, tokens, opts) { parse_script(tokens, opts) }) end