Skip to content

Unknown option when alias begins with other alias #82

@arichiardi

Description

@arichiardi

Hi there!

I have the following :spec:

:verbose {:desc "Enable verbose output." :alias :v}
   :very-verbose {:desc "Enable very verbose output." :alias :vv}

That when I cli/parse-args returns the unknown option error (via the :error-fn):

{:spec {:verbose {:desc "Enable verbose output.", :alias :v}
        :very-verbosd {:desc "Enable very verbose output.", :alias :vv}}
 :type :org.babashka/cli, :cause :restrict, :msg "Unknown option:" :e
 :restrict #{:check :verbose :fix :very-verbosd}, :option :e}

I could reproduce it only when :vv is used as :alias.

Using bb --version babashka v1.3.186.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions