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

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

@mabushey

Description

@mabushey

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions