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

Error when querying bugs with 1+ parameters #1032

Open
danisztls opened this issue Mar 5, 2023 · 3 comments
Open

Error when querying bugs with 1+ parameters #1032

danisztls opened this issue Mar 5, 2023 · 3 comments

Comments

@danisztls
Copy link

When running the following command from the README:

git bug ls "status:open sort:edit"

It returns Error: unknown qualifier "status:open sort"

Though this works fine:

git bug ls "status:open" "sort:edit"
@smoyer64
Copy link
Collaborator

smoyer64 commented Mar 6, 2023

It also works without any quotes at all - I'm a bit surprised that it didn't consider the whole enclosed string as a text query. The next example in the README definitely requires the quote (in Bash on Linux) to escape the space:

git bug ls "foo bar" baz

Clearly it would be possible to fix the README but making the argument parsing more robust would be more user-friendly. I'll take a look at whether the command-line parsing code in Cobra is platform dependent. I'm also wondering if there's a way to test this for all OSes and shells we support.

@danisztls
Copy link
Author

I'm also wondering if there's a way to test this for all OSes and shells we support.

Can use a GH workflow for that and compare command outputs with expected values.

@smoyer64
Copy link
Collaborator

smoyer64 commented Mar 6, 2023

Yes ... there are a ton of tests running via GHA on Windows, Mac OSX and Linux in 'git-bug'. What I meant is that we may not be able to test with every permutation of shell and OS, and that during testing (at least using go test), we can't control how the shell might process the arguments before it passes them to Go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants