It looks like typst compile in.typ - should write to stdout, but it writes to the file named -?
I tried with typst v0.11.1 on Windows and Ubuntu. By the way, typst compile - out.svg works.
This feature was added in PR #3632, and Output::Stdout still exists in the repo. So is it a bug, or should I somehow escape the - for the shell? Thanks in advance.
You can also/already use typst c -f svg input.svg /dev/stdout on UNIX-like OSes.
The information about the - feature is present in the help message (typst c --help):
Usage: typst-0.11.1 compile [OPTIONS] <INPUT> [OUTPUT]
Arguments:
<INPUT> Path to input Typst file, use `-` to read input from stdin
[OUTPUT] Path to output file (PDF, PNG, or SVG)
In the current version:
Usage: typst compile [OPTIONS] <INPUT> [OUTPUT]
Arguments:
<INPUT> Path to input Typst file. Use `-` to read input from stdin
[OUTPUT] Path to output file (PDF, PNG or SVG). Use `-` to write output to stdout
Yes and thanks for sharing the latest help message; but I have to use it on both Unix and Windows… Looking forward to typst v0.12!
P.S. POSIX/Unix/GNU has a nice design, and apps running on Windows (unfortunately) have to take the responsibility to implement what should be provided by/with the OS: stdin/out/err as files, &/fg/bg, glob/shell expansion, bring your own dll, $PAGER, etc.
Some people say that WSL is their savior (and why they won’t switch to Linux), others say that WSL is so broken they hate using it or don’t use it at all. I don’t know if /dev/stdout works in WSL.