Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
4  
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

1 Answer 1

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

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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