Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make switch easier with flags instead of positionals #71

Open
thekaveman opened this issue Dec 6, 2024 · 0 comments · May be fixed by #72
Open

Make switch easier with flags instead of positionals #71

thekaveman opened this issue Dec 6, 2024 · 0 comments · May be fixed by #72
Assignees
Labels
cli New command line interface feature implementation or refactor

Comments

@thekaveman
Copy link
Member

Current

Right now the switch command works like:

$ littlepay switch --help
usage: littlepay switch [-h] TYPE VALUE

positional arguments:
  TYPE        The type of object to switch
  VALUE       The new object value

options:
  -h, --help  show this help message and exit

E.g. to switch the environment to qa:

littlepay switch env qa

Proposal

It would be nicer to use flags instead of a positional for the TYPE argument:

littlepay switch --env qa

This would allow for e.g. shortcut flags (particularly helpful for the participant type):

littlepay switch -p cst

And even switching both env and participant at the same time:

littlepay switch -e qa -p cst
@thekaveman thekaveman added the cli New command line interface feature implementation or refactor label Dec 6, 2024
@thekaveman thekaveman moved this from Todo to Stretch in Digital Services Dec 6, 2024
@thekaveman thekaveman linked a pull request Dec 6, 2024 that will close this issue
@thekaveman thekaveman self-assigned this Dec 6, 2024
@thekaveman thekaveman moved this from Stretch to In review in Digital Services Dec 6, 2024
thekaveman added a commit to cal-itp/benefits that referenced this issue Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli New command line interface feature implementation or refactor
Projects
Status: In review
Development

Successfully merging a pull request may close this issue.

1 participant