Skip to content

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

aonez added 3 commits April 22, 2024 14:36
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.

1 participant