class Docopt::ZshCompletion

Defined in:

zsh_completion.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(doc : String, custom_completions : Hash(String, String) = {} of String => String) #

[View source]

Instance Method Detail

def build_command_tree(pattern : Docopt::Pattern, cmd_params : CommandParams) : CommandParams #

ameba:disable Metrics/CyclomaticComplexity


[View source]
def create_argument_completions(arguments : Array(String), custom_name : String) : Array(String) #

[View source]
def create_command_args(subcommands : Hash(String, CommandParams)) : Array(String) #

[View source]
def create_completion_function(cmd_name : String, param_tree : CommandParams, option_help : Hash(String, String), function_name : String | Nil = nil, command_parts : Array(String) = [] of String) : String #

[View source]
def create_function_body(cmd_name : String, param_tree : CommandParams, option_help : Hash(String, String), command_parts : Array(String), indent : Int32 = 0) : String #

[View source]
def create_option_args(options : Array(String), option_help : Hash(String, String)) : Array(String) #

[View source]
def create_state_machine(cmd_name : String, param_tree : CommandParams, option_help : Hash(String, String), function_name : String) : String #

[View source]
def get_completion_file_content(cmd : String, param_tree : CommandParams, option_help : Hash(String, String)) : String #

[View source]
def get_completion_filepath(cmd : String) : String #

[View source]
def get_completion_path : String #

[View source]
def parse_params : Tuple(CommandParams, Hash(String, String)) #

[View source]
def sanitize_name(name : String) : String #

[View source]