jwaldrip / admiral.cr

A robust DSL for writing command line interfaces written in Crystal.
https://jwaldrip.github.com/admiral.cr
MIT License
135 stars 14 forks source link

Flags don't work with spaces. #20

Closed skull-squadron closed 4 years ago

skull-squadron commented 5 years ago
class Converter < Admiral::Command
  define_flag input : String,
              description: "Whatever",
              default: "/dev/stdin",
              long: input,
              short: i,
              required: true
  def run
    puts "Input is #{flags.input}"
  end
end

Works

-i=foo --input=foo

Doesn't work

-i foo --input foo -ifoo

jwaldrip commented 4 years ago

@steakknife this should definitely work.

gerrywastaken commented 4 years ago

Yeah I tested and those Doesn't work cases all worked here.