-
Notifications
You must be signed in to change notification settings - Fork 2
Home
jqsh is a shell based on jq and sh.
The jq part stands for the jq JSON preprocessor by @stedolan, @nicowilliams, and contributors.
The sh refers to the language being intended for shell scripting in general, as well as the Bourne shell and derived shells (bash and Zsh) specifically.
We're not exactly sure what jq stands for, but we're assuming it means JSON query, which would make jqsh short for JavaScript Object Notation Query Shell.
jqsh's language is based on jq's, but it is not a superset. Some of the most significant differences:
- There are two new datatypes: exceptions and functions.
-
jqshfilters operate on entire channels insteal of individual values likejqfilters. - Function arguments are separated from the function and each other by whitespace like in
sh, instead of semicolons and parentheses like injq. - The semicolon is an operator which ignores the left side's output, similar to
sh's semicolon. - Variable assignment uses the syntax
$variable = expressioninstead ofexpression as $variable. - There are new built-ins for calling external programs, importing libraries, raising and handling exceptions, and more.
- Continuing a convention from JavaScript and JSON, function names are camel cased. Underscores are not permitted in names.
- The language is more flexible, permitting the definition of new atomic, prefix, suffix, and binary operator symbols and keywords.
The first prototype of jqsh was implemented in Python 3, which was easiest for us. The language has significant disadvantages such as the GIL and runtime dependencies, so we are now starting an implementation in Rust, which if all goes well will be the jqsh implementation.
Our main way of communicating is the Slack channel #jqsh on functionalprogramming.slack.com. There is also the IRC channel #jqsh on Freenode.