Skip to content
This repository has been archived by the owner on Nov 26, 2023. It is now read-only.

Autocorrect wrong on fields with a - in the name #17

Open
mabushey opened this issue Mar 9, 2020 · 0 comments
Open

Autocorrect wrong on fields with a - in the name #17

mabushey opened this issue Mar 9, 2020 · 0 comments

Comments

@mabushey
Copy link

mabushey commented Mar 9, 2020

curl http://musicbrainz.org/ws/2/artist/5b11f4ce-a62d-471e-81fc-a69a8278c7da\?inc\=aliases\&fmt\=json | jiq

[Filter]> .
{
  "isnis": [
    "0000000123486830",
    "0000000123487390"
  ],
  "ipis": [],
  "end-area": null,
  "id": "5b11f4ce-a62d-471e-81fc-a69a8278c7da",
  "end_area": null,
  "type": "Group",
  "life-span": {
    "ended": true,
    "end": "1994-04-05",
    "begin": "1988-01"
  },
...

If I type in .life it autocompletes it to .lifefe-span"]. It's close, but it's not getting the [" part right.
Fully typing in [Filter]> .["life-span"] does work.
Using the "alternate syntax" which is required with dashes, I get:

[Filter]> .["lif              
jq: error: syntax error, unexpected $end, expecting QQSTRING_TEXT or QQSTRING_INTERP_START or QQSTRING_END (Unix shell quoting issues?) at <top-level>, line 1:
.["lif          
jq: 1 compile error

This is awesome, thanks!

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

No branches or pull requests

1 participant