tmt icon indicating copy to clipboard operation
tmt copied to clipboard

Idea: args shortening

Open pvalena opened this issue 6 years ago • 1 comments

Can we do shortening like --playbook = --playbooks, --script = --scripts etc. then?


tmt plan --hel
Usage: tmt plan [OPTIONS] COMMAND [ARGS]...
Try "tmt plan --help" for help.

Error: no such option: --hel  Did you mean --help?

For command shortening I needed to do this.

Originally posted by @psss in https://github.com/psss/tmt/timeline

pvalena avatar Mar 12 '20 13:03 pvalena

Yeah, definitely +1. We already have a story for this. Just to implemet it ;-)

psss avatar Mar 16 '20 10:03 psss

Sounds like a good idea. There can be different levels, though: accepting shortened options, accepting shortened commands, supporting user-defined command aliases, and providing hints on mistyped commands and options ("did you mean ...?"). It would also be nice if some degree was supported by tmt lint and/or validation, e.g. re-use the "fuzzy" matching code & hints to print the same info when user makes a typo in their fmf files.

Maybe we should split this issue into smaller, more specific improvements. It fits my ideas on how to make tmt nicer and more user-friendly, so I'd personally give it some time if necessary.

happz avatar Apr 01 '25 21:04 happz