Skip to content

feat(cmd): Make "extract" more user-friendly, matching common archive tools#653

Merged
willscott merged 1 commit intoipld:masterfrom
davidebeatrici:cmd-extract-match-create-args
Mar 14, 2026
Merged

feat(cmd): Make "extract" more user-friendly, matching common archive tools#653
willscott merged 1 commit intoipld:masterfrom
davidebeatrici:cmd-extract-match-create-args

Conversation

@davidebeatrici
Copy link
Copy Markdown
Contributor

@davidebeatrici davidebeatrici commented Feb 18, 2026

Usage:

car extract --file file.car [--output output] [mydir/mysubdir] [mydir/mysubdir2/file] [mydir2] [myfile]...

This also makes extract much more consistent with create and matching common archive tools:

  • Not specifying any paths results in a complete extraction.
  • To read from stdin a single dash (-) is specified as the input file.

@davidebeatrici davidebeatrici force-pushed the cmd-extract-match-create-args branch 2 times, most recently from f1f581c to 9355b5a Compare February 18, 2026 07:43
@davidebeatrici
Copy link
Copy Markdown
Contributor Author

@willscott @rvagg Gentle ping, this and #642 will allow me to implement support for reading CAR files in KDE's Ark.

@willscott
Copy link
Copy Markdown
Member

I'm fine with the changes to output / specifying of partial extraction.

I think you should retain the ability to stream from stdin or pipe from output of another command. there's no reason to remove that functionality and it does not reduce consistency. (e.g. tar / gz / etc all support extraction from stdin)

@davidebeatrici
Copy link
Copy Markdown
Contributor Author

Thank you.

Let's use the dash (-) to read from stdin/pipe, just like tar?

… tools

Usage: car extract --file file.car [--output output] [mydir/mysubdir] [mydir/mysubdir2/file] [mydir2] [myfile]...

This also makes "extract" much more consistent with "create" and matching common archive tools:

- Not specifying any paths results in a complete extraction.
- To read from stdin a single dash ('-') is specified as the input file.
@davidebeatrici davidebeatrici force-pushed the cmd-extract-match-create-args branch from 9355b5a to ea2a490 Compare March 13, 2026 08:06
@davidebeatrici
Copy link
Copy Markdown
Contributor Author

@willscott Done.

@willscott willscott merged commit 1f4ba3c into ipld:master Mar 14, 2026
11 checks passed
@davidebeatrici davidebeatrici deleted the cmd-extract-match-create-args branch March 14, 2026 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants