Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added -o path parameter #33

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Added -o path parameter #33

wants to merge 3 commits into from

Conversation

aonez
Copy link

@aonez aonez commented Apr 22, 2024

Added -o path parameter to specify a custom destination/name for the output file.

  • Applies -k and only applies if -c is not used.
  • If the parameter points to a directory it uses the current naming method.
  • If the parameter points to a new file uses it as a custom name.

Compression examples

# Will output at ./custom_name.tar.sz
snzip -o custom_name.tar.sz archive.tar

# Will output at /some/path/archive.tar.sz
snzip -o /some/path archive.tar

# Will output at /some/path/custom_name.tsz
snzip -o /some/path/custom_name.tsz archive.tar

# Will output at /some/path/no_extension_file
snzip -o /some/path/no_extension_file archive.tar

Uncompression examples

# Will output at ./custom_name.txt
snzip -d -o custom_name.txt archive.txt.sz

# Will output at /some/path/archive.txt
snzip -d -o /some/path archive.txt.sz

# Will output at /some/path/custom_name.txt
snzip -d -o /some/path/custom_name.txt archive.txt.sz

# Will output at /some/path/no_extension_file
snzip -d -o /some/path/no_extension_file archive.txt.sz

Added `-o path` parameter to specify a custom destination for the output file. Applies `-k` and only applies if `-c` is not used.
If the parameter point to a directory, use the current naming method.
If points to a new file, use as a custom name.
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.

None yet

1 participant