You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 16, 2020. It is now read-only.
$ bash --version
GNU bash, version 4.4.19(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.2 LTS
Release: 18.04
Codename: bionic
Note that my issue comes from having stdin being closed in the parent process. Here the first command produces a proper svg, the second one produces an empty one:
$ ./result/bin/termtosvg -c 'echo hello'
Recording started, enter "exit"command or Control-D to end
hello
Rendering ended, SVG animation is /tmp/termtosvg_33py0s74.svg
$ :| ./result/bin/termtosvg -c 'echo hello'
Recording started, enter "exit"command or Control-D to end
Rendering ended, SVG animation is /tmp/termtosvg_2dp1mpj2.svg
(note how echo isn't even executed)
Can you try a command by piping nothing into it? e.g. call : and pipe its output to termtosvg via : | termtosvg -c ...?
Note: I doubt this is a very common use case. I'm generating SVGs from commands inside a nix build, where stdin is closed. The workaround mentioned above (with tail -f /dev/null) works OK.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
If stdin is closed
termtosvg
will create a (mostly) empty svg. E.g. running this:termtosvg -g 82x19 -c 'echo hello' out.svg
with closed stdin won't produce any frames. Instead one has to do something like this:
which will produce an SVG file where we see "hello" being printed.
The text was updated successfully, but these errors were encountered: