4 ms·
Nice plugin; I got it and will be using it. Browsing the code, I saw a couple of small errors; not too serious, but some error handling is incorrect. In your
by ykonstant 3y ago
Nice plugin; I got it and will be using it. Browsing the code, I saw a couple of small errors; not too serious, but some error handling is incorrect. In your `jq_complete()` function, for instance, you have
local query="$(__get_query)"
local ret=$?
Unless the `local` assignment to `query` fails, `ret` will always be 0 regardless of the return value of `__get_query`. To fix this, you would need your first line to be
local query; query="$(__get_query)"
and so on.
- neuromanser 3y agoI pointed out exactly this in https://news.ycombinator.com/item?id=38188500 https://news.ycombinator.com/item?id=38188500
- reegnz 3y agoFixed: https://github.com/reegnz/jq-zsh-plugin/pull/25 https://github.com/reegnz/jq-zsh-plugin/pull/25