-
Notifications
You must be signed in to change notification settings - Fork 78
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
Disable smart unpack when --dir
is provided
#322
Comments
This is a follow-up to #321 (kinda), having this kind of specific and unpredictable behavior for smart unpack makes me question if we have a better solution for this, and if this feature is worth having. What do you think @a-moreira @figsoda? I still think we need a way to protect the user from messing it up, I run into this problem often, a |
I agree. With decompressing tools, I generally expect this behavior:
The smart unpack feature caught me off-guard when testing this application, indeed. |
I would argue that smart unpack should be behind a flag, and |
Yeah that's the current behavior I was complaining about. Just to clarify, here's an explanation of what
This explanation ignores the implementation details because those can change at any time. Both of you agreed that I'm against just removing it right now without a better replacement because I feel like it's handy, sometimes I unpack an archive expecting some layout, and I get surprises. About adding it as a flag ( I might sound a bit crazy with this "protect the users" stuff, it's a CLI tool and CLI tools often don't care much, but at the same time, if we don't do anything then we take the L and accept that decompression via CLI is worse than doing it with GUI, GUI tools like Nautilus always create a dedicated folder with the name of the archive to keep things simple and avoid these problems, and that has always been great.
🤔 could work, but I'm not comfortable answering too many questions (one for each archive with multiple files in its root), I'm assuming it's a Y/N question, and not three options (cancel, unpack here, unpack in new folder). |
Currently, It's possible to refactor it and avoid having to create a temporary directory and move stuff around. I haven't created an issue for this refac yet because we aren't sure if this feature will be removed or not. |
From a user standpoint, I would like any/all of the following.
The current implementation is not logical. I'm using doggo as an example.
|
Thanks for the input. About |
When decompressing an archive, there is a risk of messing up the current folder, if the archive is huge it will mix your folder with a lot of files and you'll have a hard time trying to clean it up afterwards.
To solve this, Ouch has a hidden feature called "smart unpack", when it detects that an archive has more than one file, it creates a new folder and unpacks all the contents inside of that folder, so cleaning up is as simple as deleting that folder.
However, if the user specified a target directory with
--dir
, we could (?) assume they intentionally want to decompress it into that folder directly, so "smart unpack" can be disabled, it will just create an unwanted nested folder.The text was updated successfully, but these errors were encountered: