[issue9234] argparse: aliases for positional arguments (subparsers)

2010-12-17 Thread Adrian Sampson
Adrian Sampson asamp...@cs.washington.edu added the comment: Thanks for the suggestion, Steven. I hadn't yet internalized the difference between dest and metavar. This version of the patch modifies metavar instead. Because it looks like this issue is up for 3.2b2, I've modified NEWS and ACKS

[issue9234] argparse: aliases for positional arguments (subparsers)

2010-12-15 Thread Adrian Sampson
Adrian Sampson asamp...@cs.washington.edu added the comment: Great. I've added a simple example to the documentation for argparse. I also added a space to the comma separator in the alias list, but I'm worried that adding 'aliases:' will make the help less readable (especially if every command

[issue9234] argparse: aliases for positional arguments (subparsers)

2010-12-13 Thread Adrian Sampson
Adrian Sampson asamp...@cs.washington.edu added the comment: Sorry I'm slow. Here's a new patch that includes tests. I'll also write documentation if that would be helpful, although I'm not very familiar with the style recommendations. -- Added file: http://bugs.python.org/file20034

[issue9234] argparse: aliases for positional arguments (subparsers)

2010-12-12 Thread Adrian Sampson
Adrian Sampson asamp...@cs.washington.edu added the comment: Thanks for the pointer, Éric. Here's a quick patch that integrates the same functionality into the existing subparser class. -- keywords: +patch Added file: http://bugs.python.org/file20026/argparse-aliases.patch

[issue9234] argparse: aliases for positional arguments (subparsers)

2010-07-12 Thread Adrian Sampson
New submission from Adrian Sampson asamp...@cs.washington.edu: The argparse module supports subparsers, which allow CLI tools to support invocation of subcommands (much like the svn or hg programs). For these subcommands, it is often useful to allow multiple names for the same command