Jeff Bailey 42a1c34222 Add POSIX keystring parsing and argv pre-expansion (#114)
Support traditional key syntax (for example `tar cvf archive.tar file`)
by rewriting a leading key operand into clap-compatible short options
before argument parsing.

- detect valid keystrings in argv[1]
- expand key letters into `-<opt>` arguments
- consume operands for `f` and `b` in key order
- forward `-b` (currently unsupported) so key/dash forms fail consistently
- update usage text to document key syntax
- add unit tests for key detection/expansion
- add integration tests for create/extract parity and `-b` failure parity

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2026-03-25 18:22:14 +01:00
2025-02-01 18:07:27 +01:00
2025-09-24 20:53:22 +02:00
2025-10-21 18:00:16 +02:00
2025-02-01 18:07:27 +01:00
2025-02-01 18:07:27 +01:00

Crates.io Discord License dependency status

CodeCov

tar

Rust reimplementation of the tar utility.

Installation

Ensure you have Rust installed on your system. You can install Rust through rustup.

Clone the repository and build the project using Cargo:

git clone https://github.com/uutils/tar.git
cd tar
cargo build --release
cargo run --release

Testing

The tar application has a focused testing philosophy that separates concerns between the application (CLI interface, error handling, user experience) and the underlying tar-rs library (archive format correctness, encoding, permissions).

See tests/README.md for comprehensive documentation.

# Run all tests
cargo test --all

# Run specific test
cargo test test_create_single_file

License

tar is licensed under the MIT License - see the LICENSE file for details

S
Description
No description provided
Readme MIT 1 MiB
Languages
Rust 72.4%
Python 19.7%
Shell 7.9%