shqq

Embed shell commands with interpolated Haskell variables, and capture output

Latest on Hackage:0.1

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.

BSD-3-Clause licensed and maintained by Keegan McAllister

This library provides a quasiquoter for executing shell commands, somewhat similar to Perl's backtick operator. Shell commands are IO actions, and they capture the command's standard output as a String result.

You can use Haskell variables in a shell command. A string representation of the contents will be interpolated. The shell will see each interpolated variable as a single token without interpreting special characters, unless you choose otherwise.

Note: The shell escaping is not correct for the Windows shell. This library should fail to build on Windows, as well.

Examples of using this library are included in examples/.