Pulp-cli usability discussion

I recently noticed something, that annoys me very greatly about Pulp CLI usage:

Namely, different sub-commands, tend to use different option names, for the same things.

For example, let’s suppose I want to see the repository with name “test”:

pulp deb repository show --name="test"

Now I decide, I actually want to see the latest repository version for that same repository. Instead of having to add just the subcommand before the show, I also need to change the option name:

pulp deb repository version show --repository="test"

This is because the repository command is “about repositories” and therefor has the option --name to refer to repositories, but the version command has the option --repository because --name to refer to repository names would not make sense here.

Would it be possible to add option names, that are descriptive independently of whether the relevant sub command is “about that entity” or not? For example, both pulp deb repository show and pulp deb repository version show might both accept the option --repository-name as an alias for --name and --repository respectively. (If it is possible to add aliases for options we don’t need to break the existing CLI interface for this).

Then I could run:

pulp deb repository show --repository-name="test"
pulp deb repository version show --repository-name="test"

Which allows me to make minimal adjustments to my first command for great convenience!

4 Likes

This sounds like great idea in my opinion. I’ll add it to open floor agenda as good candidate for a story (RFE).

This is a good suggestion. Please file an RFE for the pulp-cli project.

“RFE” is just a fancy word for GitHub issue in this context?

Yes it is :slight_smile:

3 Likes