pydoit / doit

CLI task management & automation tool
http://pydoit.org
MIT License
1.87k stars 175 forks source link

Enhance choice to use three-string tuples #348

Closed tinjaw closed 4 years ago

tinjaw commented 4 years ago

I'd like to add a third string to the tuple. The first string would change from value to key, and the third string would become the value. This would allow alias-like parameters to simplify normally complex ones. A fine example are path strings.

"params": [
            {
                "name": "savepath",
                "short": "s",
                "long": "savepath",
                "type": str,
                "choices": (("one", "The first location", "C:/one/two/three"),
                     ("two", "The second location", "D:/four/five/six")),
                "default": "one",
                "help": "Choose between one and two",
            }
        ],
schettino72 commented 4 years ago

This is something better handled at application level code.