200ok-ch / counsel-jq

Traverse complex JSON and YAML structures with live feedback
https://200ok.ch/project/counsel_jq.html
GNU General Public License v3.0
126 stars 7 forks source link

Error when querying for keys #10

Open Pentaquark1 opened 3 years ago

Pentaquark1 commented 3 years ago

When I use jq over the cli, querying for keys like this works fine:

code-dev/api » jq 'keys' test.json
[
  "has_more",
  "items",
  "quota_max",
  "quota_remaining"
]

When I try to do the same thing with counsel-jq (query for 'keys') on the same file, I get the following error: jq: error: syntax error, unexpected INVALID_CHARACTER, expecting $end (Unix shell quoting issues?)

Environment is doom emacs, anyone encounter the same issue yet?

mateialexandru commented 2 years ago

Yes, encountered the same, but on Windows

mateialexandru commented 2 years ago

Might help: make sure icomplete mode is disabled

(icomplete-mode 0)

munen commented 2 years ago

Apologies for not having answered to the original issue :pray: I must have missed the notification. Thank you, @mateialexandru for picking it up, again!

Having said so, unfortunately I cannot reproduce the error on my machine:

image

icomplete-mode has a value of nil on my machine. I checked my config and I'm not setting it explicitly. But even when set to 1, it works the same as in the screenshot above.

Hence, I am assuming it's something in your setup. Can you run an unconfigured instance of Emacs (emacs -Q) and only install counsel-jq, for example?