zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Felipe Contreras <felipe.contreras@gmail.com>
Cc: zsh-workers@zsh.org
Subject: Re: Getting original words after _arguments
Date: Sun, 21 Apr 2013 11:55:08 -0700	[thread overview]
Message-ID: <130421115508.ZM6625@torch.brasslantern.com> (raw)
In-Reply-To: <CAMP44s0i+e0yNQ9AABQzF6Diqbgt1EQXj7gR-PMAOb+a+FQ_DA@mail.gmail.com>

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.


  reply	other threads:[~2013-04-21 18:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-19  8:21 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 [this message]
2013-04-21 20:42       ` Felipe Contreras

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=130421115508.ZM6625@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=felipe.contreras@gmail.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).