dev@glassfish.java.net

"Did you mean" in asadmin

From: Cheng Fang <Cheng.Fang_at_Sun.COM>
Date: Thu, 10 Aug 2006 11:09:47 -0400

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?

-- 
Cheng