cmd: Add support for disabling specific abbrevs
authorSimon Wilkinson <sxw@your-file-system.com>
Mon, 30 May 2011 19:02:31 +0000 (20:02 +0100)
committerDerrick Brashear <shadow@dementia.org>
Tue, 7 Jun 2011 14:44:14 +0000 (07:44 -0700)
commit78c0e3b0efffe19c33bd0467872d65af43e5a47e
tree2e40c30af1598bb66d2c34e7bd21fb208ef57988
parentc47f81d7076d5ecb52cb68a0535a78561c224c51
cmd: Add support for disabling specific abbrevs

Sometimes, when adding a new command parameter, it's necessary to
prevent it from colliding with an existing abbreviation. This patch
adds a new command flag CMD_NOABBRV which can be set on a parameter
to indicate that it should not be considered when checking for
ambiguous abbreviations.

For example, if a command has the existing '-cell' option which is
popularly abbreviated to '-c', adding a '-config' option would
cause the existing abbreviation to stop working. However, if '-config'
is added with the NOABBRV flag set, '-c' will continue to work.

Change-Id: I3b6d718f9dd81c44fb1d10c904db6a4a0fd763b8
Reviewed-on: http://gerrit.openafs.org/4810
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
src/cmd/cmd.c
src/cmd/cmd.p.h
tests/cmd/command-t.c