module Kommando::Parser

Defined in:

kommando/parser.cr

Constant Summary

OPTION_PATTERN = /-[a-zA-Z]/
QUOTES = /"'/

Class Method Summary

Class Method Detail

def self.call(original_args : Array(String)) : NamedTuple(positional: Array(String), options: Hash(String, String | Nil)) #

Parses:

"first -a=1" => {positional: ["first"], options: {"a" => 1}}

"first -1 -b third" => {positional: ["first", "-1", "third"], options: {"b" => nil}}


[View source]