Q//, also known as the Q Shell, is a set of command-line tools designed for maximum orthogonality and interoperability. It aims at bringing pipes closer to their potential while avoiding suboptimal, multi-purpose tools with lossy, text-based communication. Basically, it's like the Unix toolbox with a JSON-ified pipeline and stringent specialisation.
Executable binaries are provided for select platforms (OS X) on the website at https://infinitary.org/qsh. Hence, in the most convenient way...
chmod +x qif necessary
qand marvel at its clarity, elegance and power
Alternatively, you can build your own binary by downloading the Q// sources and calling
make in the root folder of the Q// project. The current version of Q// is UNIX derivate-friendly, it may provide a suboptimal experience when used on other kinds of operating systems.
To try the replacement of the
ls command, type
$ q list
// (two consecutive slashes) are the equivalent of the
| pipe operator. To more or less replicate the
ls -R command, type
$ q directory // list
q shell wrapper will find shortened commands when unambiguous, hence instead of the above you may also type
$ q d // l
A more involved, powerful yet simple example, to list the ten largest files under the current directory type
$ q d // l // s size // t // p size path
The currently available commands of Q// are
$ q checksum Checksum operations to track content changes directory Recursively traverses a directory hierarchy filter Filters items that match certain criteria head Limits the pipeline output to the first items inspect Inspect the names and data types of fields list Lists the contents of one or more directories print Prints fields of items using various formats sort Rearranges the order of the received items tail Limits the pipeline output to the last items q Version, change log and copyright information
For usage information about a specific command, call it with the
-?) option - e.g. to get help on
$ q l -h
Coming soon. Or not soon. Maybe. Dunno.
Because Q rhymes with queue and I needed a single letter command that's not in use yet as a shell command. Also, the Q key sits comfortably under the left pinky so it's easy and quick to hit. And the // operator is to avoid colliding with the unix pipe symbol, with the same ease of typing, under the right pinky (sorry, people on non-US keyboards, your life sucks anyways).
Because of orthogonality. Get used to it, feel the power and thank me later :-)
So that all commands can be issued by their first letter.
Copyright © 2018-2019 Infinitary, GNU General Public License (GPL) V3
Q// is free software: you can redistribute and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
Q// is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Refer to the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with Q//. If not, see the GNU website at https://www.gnu.org/licenses. Further information you find on the Q// website at https://infinitary.org/qsh.