zsh-workers
 help / color / mirror / code / Atom feed
* Getting original words after _arguments
@ 2013-04-19  8:21 Felipe Contreras
  2013-04-20 15:36 ` Bart Schaefer
  0 siblings, 1 reply; 6+ messages in thread
From: Felipe Contreras @ 2013-04-19  8:21 UTC (permalink / raw)
  To: zsh-workers; +Cc: Felipe Contreras

Hi,

I have a function along these lines:

__test ()
{
	local curcontext="$curcontext" state state_descr line
	typeset -A opt_args
	local -a orig_words

	orig_words=( ${words[@]} )

	_arguments -C '--stuff' && _ret=0

	words=( ${orig_words[@]} )

	# stuff using words
}

I need to have access to the original array of words, before the
_arguments stuff is run, and so far the only I can achieve that is by
manually storing the old ones, and then restoring them.

Is there an easier way? Surely the contents of the command line must
be stored somewhere.

Cheers.

P.S. Please reply-to-all so I stay in the loop.

-- 
Felipe Contreras


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

end of thread, other threads:[~2013-04-21 20:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-19  8:21 Getting original words after _arguments Felipe Contreras
2013-04-20 15:36 ` Bart Schaefer
2013-04-20 20:07   ` Peter Stephenson
2013-04-20 22:03   ` Felipe Contreras
2013-04-21 18:55     ` Bart Schaefer
2013-04-21 20:42       ` Felipe Contreras

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).