zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: 3.1.6-pws-5: _tar
@ 1999-09-24  9:45 Peter Stephenson
  1999-09-24 14:41 ` Emulation (Re: PATCH: 3.1.6-pws-5: _tar) Bart Schaefer
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Stephenson @ 1999-09-24  9:45 UTC (permalink / raw)
  To: Zsh hackers list

_tar can't handle reading from tar archives if the archive name begins with
a ~.  The following handles it the simplest way, but there are still
possible quoting problems.

--- Completion/User/_tar~	Mon Aug 30 17:27:36 1999
+++ Completion/User/_tar	Fri Sep 24 10:00:28 1999
@@ -53,15 +53,15 @@
 
 tmp="$words[(I)--file=*]"
 if (( tmp )); then
-  tf="${words[tmp][8,-1]}"
+  tf=${~words[tmp][8,-1]}
   _tar_cmd="f$_tar_cmd"
 elif [[ "$words[2]" != -* && "$words[2]" = *f* ]]; then
-  tf="$words[3]"
+  tf=${~words[3]}
   _tar_cmd="f$_tar_cmd"
 else
   tmp="${words[(I)-*f*~--*]}"
   if (( tmp )); then
-    tf="$words[tmp+1]"
+    tf=${~words[tmp+1]}
     _tar_cmd="f$_tar_cmd"
   fi
 fi

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Emulation (Re: PATCH: 3.1.6-pws-5: _tar)
  1999-09-24  9:45 PATCH: 3.1.6-pws-5: _tar Peter Stephenson
@ 1999-09-24 14:41 ` Bart Schaefer
  1999-09-24 15:44   ` Tanaka Akira
  0 siblings, 1 reply; 3+ messages in thread
From: Bart Schaefer @ 1999-09-24 14:41 UTC (permalink / raw)
  To: Zsh hackers list

On Sep 24, 11:45am, Peter Stephenson wrote:
} Subject: PATCH: 3.1.6-pws-5: _tar
}
} _tar can't handle reading from tar archives if the archive name begins with
} a ~.  The following handles it the simplest way, but there are still
} possible quoting problems.

Has anyone checked that "emulate -L zsh" is used in all the completion
functions where it is necessary?  A grep finds it in only eight of them,
*not* including _arguments -- I can't believe ksharrays isn't going to
bite somebody at some point, if nothing else.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Emulation (Re: PATCH: 3.1.6-pws-5: _tar)
  1999-09-24 14:41 ` Emulation (Re: PATCH: 3.1.6-pws-5: _tar) Bart Schaefer
@ 1999-09-24 15:44   ` Tanaka Akira
  0 siblings, 0 replies; 3+ messages in thread
From: Tanaka Akira @ 1999-09-24 15:44 UTC (permalink / raw)
  To: Zsh hackers list

In article <990924144111.ZM28860@candle.brasslantern.com>,
  "Bart Schaefer" <schaefer@candle.brasslantern.com> writes:

> Has anyone checked that "emulate -L zsh" is used in all the completion
> functions where it is necessary?  A grep finds it in only eight of them,
> *not* including _arguments -- I can't believe ksharrays isn't going to
> bite somebody at some point, if nothing else.

_main_complete has:

setopt localoptions nullglob rcexpandparam
unsetopt markdirs globsubst shwordsplit nounset ksharrays

So, at least, user's ksharrays doesn't affect the behavior of
completion functions.

I think it should also set extendedglob by default, though.
-- 
Tanaka Akira


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1999-09-24 15:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-09-24  9:45 PATCH: 3.1.6-pws-5: _tar Peter Stephenson
1999-09-24 14:41 ` Emulation (Re: PATCH: 3.1.6-pws-5: _tar) Bart Schaefer
1999-09-24 15:44   ` Tanaka Akira

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).