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

Add symbol to represent the directory name #650

Open
owenstake opened this issue Mar 26, 2024 · 2 comments
Open

Add symbol to represent the directory name #650

owenstake opened this issue Mar 26, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@owenstake
Copy link

owenstake commented Mar 26, 2024

I usually compress directory to tgz with same basename in the following way.

ouch compress dir1 dir1.tgz

Sometimes dir1 is complex with special char, I don't like to repeat myself.
Can ouch add syntax {} to represent the directory name? Expect as follows.

ouch compress dir1 {}.tgz
@owenstake owenstake added the enhancement New feature or request label Mar 26, 2024
@marcospb19
Copy link
Member

We have a --format flag that works like this:

ouch compress LONG_NAME --format tar.gz OUTPUT_NAME

It could, in theory, not require the output file:

ouch compress LONG_NAME --format tar.gz

I need to think a bit more about this.

But here is a corner case, should Ouch panic if there are multiple input arguments?

ouch compress 1 2 3 4 5 {}.tgz

@marcospb19
Copy link
Member

@owenstake do you have any opinions on this?

But here is a corner case, should Ouch panic if there are multiple input arguments?

ouch compress 1 2 3 4 5 {}.tgz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants