I'm on my $HOME directory, there is a foo.zip file. I want to extract it into $HOME/work directory, which exists

I type unzip foo it expands the filename, I enter but it doesn't expand the "w" to the "work" directory

How make this work ? In Bash this works out of the box.

link|improve this question
3  
What exactly did you type? My version of unzip expects the second argument to be the name of a file inside the archive, and that's what zsh completes. To extract to a different directory, I type unzip foo.zip -d w, and zsh does complete w into work. – Gilles Jan 2 '11 at 15:50
@Gilles: Your comment should be an answer. The difference is that the Bash completion function for unzip is simple-minded and doesn't look at the contents of the archive or whether -d is present. The zsh completion for unzip is much more sophisticated. – Dennis Williamson Jan 2 '11 at 16:54
feedback

1 Answer

You need to preceed the exdir (the directory to expand into) with the '-d' switch.

link|improve this answer
And I need to go through and add some functionality to my Easy Extract function in bash. – Rob Apr 6 at 19:11
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.