zsh-users
 help / color / mirror / code / Atom feed
From: Chet Ramey <chet.ramey@case.edu>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: zsh-users@zsh.org, chet.ramey@case.edu
Subject: Re: custom script Bash completion
Date: Sun, 10 Nov 2013 18:18:31 -0500	[thread overview]
Message-ID: <52801447.8010609@case.edu> (raw)
In-Reply-To: <131110102458.ZM21475@torch.brasslantern.com>

On 11/10/13, 1:24 PM, Bart Schaefer wrote:

>> 'tu --get-bash-completion' is invoked by zsh completion, but the three
>> arguments bash would pass to it aren't being passed.
> 
> I'm not absolutely sure if the following explains that, because none of
> the bash man pages I can find describe what those three arguments are,

In the Bash-4.2 info manual, you find:

"After these matches have been generated, any shell function or command
specified with the @option{-F} and @option{-C} options is invoked.
When the command or function is invoked, the @env{COMP_LINE},
@env{COMP_POINT}, @env{COMP_KEY}, and @env{COMP_TYPE} variables are
assigned values as described above (@pxref{Bash Variables}).
If a shell function is being invoked, the @env{COMP_WORDS} and
@env{COMP_CWORD} variables are also set.
When the function or command is invoked, the first argument is the
name of the command whose arguments are being completed, the
second argument is the word being completed, and the third argument
is the word preceding the word being completed on the current command
line."

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
		 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/


  parent reply	other threads:[~2013-11-10 23:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-10 16:14 Thomas Ballinger
2013-11-10 18:24 ` Bart Schaefer
2013-11-10 19:09   ` Thomas Ballinger
2013-11-10 20:25     ` Bart Schaefer
2013-11-10 21:34       ` Thomas Ballinger
2013-11-10 23:18   ` Chet Ramey [this message]
2013-11-11  2:12     ` Bart Schaefer

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=52801447.8010609@case.edu \
    --to=chet.ramey@case.edu \
    --cc=schaefer@brasslantern.com \
    --cc=zsh-users@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).