Support decompressing stdin
Closed this issue · 4 comments
With tar
, I can run something like curl .../file.tar.gz | tar xvz
. It would be nice if ouch
supported that for formats where streaming is possible.
Nice suggestion, this has been a suggestion for a couple years now and it's definitely something I'd merge in.
Should we use a -
arg to indicate that the archive is being passed on stdin, or infer it if there are no file args, and stdin is not a tty?
I believe -
is the way to go for STDIN.
And actually, this should probably be used for compression (and listing) too (tho decompression is a nice place to start).
If -
is a filename, should I be able to run ouch d foo.tgz - bar.tgz
to decompress two files and one stdin stream, or should -
have to appear as a single exclusive file argument? I can't think of any reason you'd want to mix stdin and regular files, but just wanted to check.