2. CLI reference¶
2.1. Regular options¶
-
--each-line,-l¶ Process each line as its own string (rather than stdin as a file at once).
Equivalent to starting with a fragment of
spy.many(pipe), but more efficient since we don’t need save the contents of the input stream for indexing.
-
--no-default-fragments¶ Don’t add any fragments to the chain that weren’t explicitly specified in the command line.
-
--no-exception-handling¶ Disable spy’s exception handling and reformatting. This is mostly only useful for debugging changes to spy itself.
-
--pipe-name=<name>¶ Name the magic pipe variable
<name>instead ofpipe.
-
--prelude=<statement>,-p<statement>¶ Run some Python before processing starts.
2.1.1. Output limiting options¶
The index arguments for these options refer to results, not input. If a single piece of input data results in 4 separate pieces of output, they’ll all count.
-
--start=<index>,-s<index>¶ Start printing results at this zero-based index.
-
--end=<index>,-e<index>¶ Stop processing data at this zero-based index.
2.2. Decorators¶
Decorator options must precede a code step. Multiple decorators can stack together. They have exactly the same effect as decorating a function in Python.
See the decorator API docs for a list of them.
2.3. Alternative actions¶
-
--help,-h¶ Show usage and option descriptions.
-
--show-fragments¶ Print out a list of string representations of the complete fragment chain that would be executed.