xvoland / Extract

Bash/Zsh function for extract: .zip, .rar, .bz2, .gz, .zlib, .tar, .tbz2, .tgz, .Z, .7z, .xz, .exe, .tar.bz2, .tar.gz, .tar.xz, etc.
MIT License
468 stars 83 forks source link

fix globbing #29

Closed ComedyTomedy closed 1 year ago

ComedyTomedy commented 1 year ago

The variable munging turns filename.tar.gz into just gz before trying to match against *.tar.gz, which inevitably fails.

Removing the munging ought to fix this.

xvoland commented 1 year ago

It doesn't solve the problem. I have corrected.

ComedyTomedy commented 1 year ago

Oh, is it removing spaces in filenames? I don't entirely understand the comma in ${1%, }, but I wonder if ${1##* } might be a good idea, stripping everything up to the final space.