oclif / cli-ux

CLI IO utilities
MIT License
544 stars 44 forks source link

add better documentation to `--filter` #414

Open georgettica opened 2 years ago

georgettica commented 2 years ago

related to https://github.com/oclif/cli-ux/blob/4e5c19b3fd13493e09379d9e7da54b4bc7e4a2d3/src/styled/table.ts#L320

after reading https://github.com/oclif/cli-ux/blob/fd0ca55f2ae7096ea273592be35e071ee4ddcb0d/src/styled/table.ts#L64-L77 I was able to deduce the != doesn't exist in the query language and a prepended - will do the trick

this could have been subverted if the help message would direct me to documentation on how the filter query language works

georgettica commented 2 years ago

@RodEsp @mattgraham could I get your 2 cents before giving it a go?

RodEsp commented 2 years ago

Hey @georgettica, thanks for pointing this out! You're right that the --filter flag doesn't support the != operator which is confusing.

If you'd just like to update the docs that would be wonderful but feel free to also take a shot at adding support for that operator if you'd like.

georgettica commented 2 years ago

created a PR with some related changes https://github.com/oclif/cli-ux/pull/435 also, as this is hacktobefest.. can this PR be included in it? if not it's fine

georgettica commented 2 years ago

Did you see my second solution to the problem?

I understand that this is not exactly what you expected, but maybe you will see the additional features it provides

georgettica commented 2 years ago

@RodEsp I created a different PR to solve the issue

There is still code-changes and it's not perfect, but closer? If not I'll add a PR with only doc changes and maybe a markdown with the query structure https://github.com/oclif/cli-ux/pull/447