dev@glassfish.java.net

Re: "Did you mean" in asadmin

From: vince kraemer <Vince.Kraemer_at_Sun.COM>
Date: Thu, 10 Aug 2006 08:33:34 -0700

This looks like a variation of
https://glassfish.dev.java.net/issues/show_bug.cgi?id=72

vbk

Cheng Fang wrote:
> asadmin sub-commands are long and hard to memorize. Oftentimes I make
> this mistake:
>
> ./asadmin list-component
> CLI001 Invalid Command, list-component. Use "asadmin help" for a list
> of valid commands.
>
> Can we give more helpful hints, in addition to the usual "Invalid ..."
> error message? For example,
>
> |./asadmin list-component|
> Did you mean "list-components"?
> CLI001 Invalid Command, list-component. Use "asadmin help" for a list
> of valid commands.
>
> ./asadmin create-datasource
> Did you mean "create-jdbc-connection-pool, create-jdbc-resource"?
>
> ./asadmin create-jdbc-resources
> Did you mean "create-jdbc-resource"?
>
> We can have some simple pattern match to map wrong subcommands to a
> list of valid commands. Any interest?
>