You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
writing that query at the shell prompt, without paren completion/matching, is quickly going to become cumbersome/error prone.
What do you think of the idea to add the switch -F (and something appropriate in long format e.g. --fn-from-file), which would read a function from file?
Why would you want to write a function in a file?
Arguably, your $EDITOR has probably the best support for paren matching/completion. So that way you can write the function in a file and the pass it in as a command line option e.g.
cat foo.json | jet -i json -o json -F /tmp/fn.clj
Just an idea, what do you think?
Thanks
The text was updated successfully, but these errors were encountered:
@dotemacs I know a better solution: -f / --func accepts a file path as well. Just check if the expression happens to refer to an existing file, if not, execute it as a Clojure expression.
@dotemacs I know a better solution: -f / --func accepts a file path as well. Just check if the expression happens to refer to an existing file, if not, execute it as a Clojure expression.
Oh, I love that! :)
Added it, just let me think of a nice way to test. PR coming up shortly.
I went ahead and implemented a comparison of
jq
tutorial injet
:https://gist.github.com/dotemacs/6c9185cca3cf59486b55471b1e965ed5
If you look at the last example:
https://gist.github.com/dotemacs/6c9185cca3cf59486b55471b1e965ed5#add-the-parent-commit-urls-to-the-above
writing that query at the shell prompt, without paren completion/matching, is quickly going to become cumbersome/error prone.
What do you think of the idea to add the switch
-F
(and something appropriate in long format e.g.--fn-from-file
), which would read a function from file?Arguably, your $EDITOR has probably the best support for paren matching/completion. So that way you can write the function in a file and the pass it in as a command line option e.g.
Just an idea, what do you think?
Thanks
The text was updated successfully, but these errors were encountered: