Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: _tar -*Cf*?



> i'd been having problems using the -C switch with _tar .. i'd usually
> use it in the context of:
> 
> tar zxvf file.tar.gz -C /path/to/unpack 
> 
> however this would call _tar_archive and complete /path on the archives
> directory structure. Looking at _tar i see:
> 
> elif [[ ( CURRENT -gt 2 && "$words[CURRENT-1]" = -*Cf*) ||
>         ( CURRENT -eq 3 && "$words[2]" = *Cf* ) ]]; then
> 
>   # a directory for -C
>   
>      _files -/ 
> 
> I'm pretty new to zsh so forgive my ignorance, but shouldn't this be -C
> rather than -Cf to get commpletion on the --directory to change to?  
> 
> Changing it to -C does indeed produce the completion i'd expected and
> _tar_archive seems to work as i'd expect with this change. I guess i'm
> looking for a sanity check .. is this a typo/error or is this likely to
> break something?
 
sorry .. i'd failed to mention that i'm using 3.1.9-dev-6

> calum
> 



Messages sorted by: Reverse Date, Date, Thread, Author