From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16177 invoked by alias); 19 Apr 2013 08:21:21 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 31275 Received: (qmail 15605 invoked from network); 19 Apr 2013 08:21:15 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,RCVD_IN_DNSWL_LOW, T_DKIM_INVALID,T_TO_NO_BRKTS_FREEMAIL autolearn=no version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.217.178 as permitted sender) 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== MIME-Version: 1.0 X-Received: by 10.112.22.198 with SMTP id g6mr3540743lbf.135.1366359668156; Fri, 19 Apr 2013 01:21:08 -0700 (PDT) Date: Fri, 19 Apr 2013 03:21:08 -0500 Message-ID: Subject: Getting original words after _arguments From: Felipe Contreras To: zsh-workers@zsh.org Cc: Felipe Contreras Content-Type: text/plain; charset=UTF-8 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