Add ability to search by arbitrary metadata by vmiklos · Pull Request #568 · git-bug/git-bug

So if I say meta:gh:"foo", I only get meta:gh:foo in go.

Is that really the shell or cobra? What do you get with meta:gh:"foo bar"?

--> I tested that, it's indeed go, but, go only unquote that and we get the args separated properly.

--> Actually, I had this problem before and to deal with it the ls command put the quotes back: https://github.com/MichaelMure/git-bug/blob/master/commands/ls.go#L93-L98

So, some shenanigan happen in the process but from the CLI side and parser side, it looks and behave as we expect it to.

then perhaps metadata:github-url=...

That could be an alternative way. The grammar would be only 1-tuples (for the full text search) and 2-tuples for the filters/sorting. No 3-tuples.

In the later case, we would still need the quotes IMHO, to make the grammar a bit more regular. Having : suddenly not being a separator because we already found two doesn't sounds like a great idea. What if we have 4 parameters next? It's unlikely but it would break the previously valid queries.

Considering this, this later syntax doesn't have much interest, no? What do you think?