Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Getting original words after _arguments
- X-seq: zsh-workers 31275
- From: Felipe Contreras <felipe.contreras@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Getting original words after _arguments
- Date: Fri, 19 Apr 2013 03:21:08 -0500
- Cc: Felipe Contreras <felipe.contreras@xxxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to:cc :content-type; bh=wt76CyMBxUu6s9cSDfdcx4v6vwmiNwHXs1Kr1hoExDU=; b=BYPzwG+sLQhn0vrMFwBVeIdUzXVSWaQqOpn8Waw/5/QIoR3hkY4dcppjPIfG2QBTlQ cxlgn8t8l9KE/qkoGeISGPIcySuEp7jX54oXFeMLle/0tYHv6JntyWovonniEiiZnI73 rxSkHlPB8g8qlt0tKM9e4xCUdd8KyITDS8b3Ui7Ukz4P4rlGfC+kG96CPlyKKu3vGIIZ hpf4h7vgdKn6tHFgT+/bpaJWdIr3t7jQGj4mUeYKPVsG59kPNI2g9BIgWnm6u0BLz3o0 TQ3PLtxY8Z0vXv+nY8BMrG/Avm0VXhaoTre6gd2cd56PDeyAlxUPpC0hZl9gxVL3Sp5/ cpzQ==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author