How do I specify a short config name for cli use?

Asked by Stuart Metcalfe

For example:

-p=<whatever> as a short-cut for the usual --project=<whatever>

Question information

English Edit question
configglue Edit question
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Ricardo Kirkner (ricardokirkner) said :

This is currently not yet supported. A new bug will be created to track work on this issue and link to this question.


Revision history for this message
Ricardo Kirkner (ricardokirkner) said :

Hi, as of today this is now supported in trunk.

The way to specify a short option name is by defining it when creating the schema. For example

class MySchema(Schema):
    foo = IntOption(short_name='f')

will result in the option being recognized either as

-f <value>


--foo <value>

from the command line.

Can you help with this problem?

Provide an answer of your own, or ask Stuart Metcalfe for more information if necessary.

To post a message you must log in.