From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21107 invoked by alias); 21 Apr 2013 18:55:35 -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: 31317 Received: (qmail 1685 invoked from network); 21 Apr 2013 18:55:23 -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.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <130421115508.ZM6625@torch.brasslantern.com> Date: Sun, 21 Apr 2013 11:55:08 -0700 In-reply-to: Comments: In reply to Felipe Contreras "Re: Getting original words after _arguments" (Apr 20, 5:03pm) References: <130420083634.ZM10866@torch.brasslantern.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Felipe Contreras Subject: Re: Getting original words after _arguments Cc: zsh-workers@zsh.org MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Apr 20, 5:03pm, Felipe Contreras wrote: } } > Hmm. The variable named "words" is special to the completion system, and } > if _arguments modifies it that probably means that later stuff is going } > to depend on the state in which $words was left. You may confuse things } > by stuffing $orig_words back into words. } } I know, I'm not going to usw zsh completion after that point. I'm sure you aren't, but the mix of user-function and built-in code in the completion system means that there may be side-effects propagating up to the caller of your function. I'm probably being overly paranoid. } > Is there some reason you can't just work on orig_words in the rest of } > your function? } } It's not my code, it's git.git's bash completion, which uses 'word'. Aha. So you're using bashcompinit? If not, you might want to look at the _bash_complete function from there. Also, if there's a shortcoming in zsh's git completion which is forcing you to use the one from bash, I think there are a few people on this list who might want details.