Neil Brown wrote: [] > I would like it to take an argument in contexts where --bitmap was > meaningful (Create, Assemble, Grow) and not where --brief is > meaningful (Examine, Detail). but I don't know if getopt_long will > allow the 'short_opt' string to be changed half way through > processing... getopt allows you to change both long and short options set before every call (provided argv&argc are intact). But. Please, pretty please, don't implement the same options with different meaning. It's confusing at best. Assign short options to frequently-used commands, and leave only long options for the rest. I dunno whichever of --brief or --bitmap is more frequent, I'd say both can be long-only, but since -b already stands for --brief, don't use it for --bitmap. > At the very least, I can print a message if '-b' is being interpreted > as as --brief, but the option argument is present. > > -a has the same problem (--add vs --auto). And this is also bad. In my opinion anyway. /mjt - To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html