Skip to content

Ignore invalid !help arguments at the end if beginning matches valid subcommand #1925

@dementati

Description

@dementati

Let's say you see an abbreviated command like

!i a l <message>

that you're not familiar with and you want to figure out what it does. So, you go:

!help i a l

Currently, the response will be:

image

This is because despite the fact that the first two characters correspond to a valid subcommand, the final term of the command line, l, is an argument and not a subcommand. Maybe you will understand this and you correct your help command and go

!help i a

which will display the description of !infraction append, including what l stands for and what it does.

At best, this means finding out what the command line does is a two-step process for no good reason. At worst, you might think you misspelled the original command line and will waste time trying to figure out what you did wrong.

This problem can be solved if we simply ignore the final arguments to !help as long as the first matches some subcommand. So, if you go

!help i a l

the first two characters will match infraction append, a valid subcommand, and will display the help page for this command, ignoring the fact that the final character does not match a command. You can then read the help page to find out that l actually is an abbreviation for the last flag.

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