bmatsuo / jqsh

An interactive wrapper to the jq command line utility
MIT License
23 stars 2 forks source link

.. shorthand conflicts with jq filter #25

Open bmatsuo opened 10 years ago

bmatsuo commented 10 years ago

I found out shortly after implementing the ".." shorthand that this conflicts with a shorthand in jq itself (.. performs recursive descent).

I'm not sure how useful recursive descent is. I find it fairly useless (though I have used "//" in xpath before). Further, the syntax causes weird problems in jq itself (e.g. "..a" doesn't work).

What I find the most troubling is that jq's interpretation of ".." is basically completely opposite of how jqsh (and unix itself) interpret those symbols. That is, in unix it means "go up one level" in jq it means "go down as many levels as possible".