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

Re: PATCH: _long_options



Sven Wischnowsky wrote:
> I had this idea when playing with `_tar' (which is not changed, yet):
> there we probably should try to turn the archive name into a absolute
> path when building the cache name. Would
> 
>   tf="$PWD/$tf"
>   tf="${${tf//.\\/}//\\/[^/]#\\/..}"
> 
> be enough for that? (Looks funny, doesn't it? ;-)

Might be safer to leave ..'s in there, since they can do funny things.  Or
only replace them at the start of the old tf, where the user's intention is
probably clear.  Or something.

There's one other thing _tar probably ought to do... well, two other
things... well among the other things _tar ought to do which conceivably I
could possibly get around to doing when I'm feeling like it...

- in principle, you can have combined short arguments like -xv or -cP or
whatever anywhere on the command line before the file list, so it probably
ought to check if it had no luck early on --- e.g. look for
-[[:alpha:]]#[cxturA]*

- any --use-compress-program=*, or indeed --use-comp*, should get added to
$largs

- any --dir*=* should be changed to when completing archives and existing
files, which is another good argument for using absolute paths for $tf.

-- 
Peter Stephenson <pws@xxxxxxxxxxxxxxxxx>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy



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