New users are surprised when OpenAFS command options
cannot be prefixed with two dashes, as is common
with most modern tools. Permit an extra dash for
common commands when more than one character is
given. For example vos listvol --server foo.bar.com is
equivalent to vos listvol -server foo.bar.com, but
vos listvol --s foo.bar.com is an error.
Reviewed-on: http://gerrit.openafs.org/216
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
int ambig;
int best;
+ /* Allow --long-style options. */
+ if (aname[0] == '-' && aname[1] == '-' && aname[2] && aname[3]) {
+ aname++;
+ }
+
cmdlen = strlen(aname);
ambig = 0;
best = -1;