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

What if file has a space character in filename? #14

Closed freed00m closed 6 years ago

freed00m commented 6 years ago

Hi,

This extractor works great but if the filename has a space character it fails to extract even if I use " or '. It says file not exists because it tried to use only the sup before the first space.

If it's not possible due to bash limitation it would be helpful to mention it in README.

freed00m commented 6 years ago

At line 10?

for n in $@

Should be?

for n in "$@"

I am no bash expert but it fixes for me. I am using suckless terminal with bash.

xvoland commented 6 years ago

Hi, I made some changes, as you ask, but it doesn't solve to the end, as it seems to me :( of course, can play with "$@" and $*.... let it be so for now ;)