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

Language:
English Edit question
Status:
Answered
For:
configglue Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

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 :
#2

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

Thanks,
Ricardo

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

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>

or

--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.