gritql icon indicating copy to clipboard operation
gritql copied to clipboard

Aliases for `--lang`

Open morgante opened this issue 1 year ago • 4 comments

I'd like to be able to use aliases like py for the lang argument:

grit apply --lang py 'identifier()'
error: invalid value 'py' for '--language <LANGUAGE>'
  [possible values: js, html, css, json, java, csharp, python, markdown, go, rust, ruby, solidity, hcl, yaml, sql, vue, toml, php, phponly]

  tip: a similar value exists: 'python'

morgante avatar Aug 06 '24 18:08 morgante

/bounty $20

morgante avatar Aug 06 '24 18:08 morgante

looking at this - I don't see '--language' or 'invalid value' in the codebase - looking for the source for the CLI option grit apply

looks like cli/src/commands/apply.rs is the place

ORESoftware avatar Aug 28 '24 22:08 ORESoftware

Here's my first stab at it: https://github.com/getgrit/gritql/pull/478

ORESoftware avatar Aug 29 '24 16:08 ORESoftware

@itsdheerajdp Don't submit code you never ran. Until you actually validate that the command shared fixes the issue it isn't worth my time to review.

morgante avatar Sep 01 '24 07:09 morgante

@algora-pbc /attempt #445

Alex-ley-scrub avatar Oct 20 '24 17:10 Alex-ley-scrub

🎉🎈 @Alex-ley-scrub has been awarded $20! 🎈🎊

algora-pbc[bot] avatar Oct 23 '24 19:10 algora-pbc[bot]