From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3403 invoked by alias); 10 Nov 2013 23:24:47 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 18139 Received: (qmail 4997 invoked from network); 10 Nov 2013 23:24:42 -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, SPF_HELO_PASS autolearn=ham version=3.3.2 Message-ID: <52801447.8010609@case.edu> Date: Sun, 10 Nov 2013 18:18:31 -0500 From: Chet Ramey Reply-To: chet.ramey@case.edu Organization: ITS, Case Western Reserve University User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.0.1 MIME-Version: 1.0 To: Bart Schaefer CC: zsh-users@zsh.org, chet.ramey@case.edu Subject: Re: custom script Bash completion References: <131110102458.ZM21475@torch.brasslantern.com> In-Reply-To: <131110102458.ZM21475@torch.brasslantern.com> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Junkmail-Whitelist: YES (by domain whitelist at mpv1.tis.cwru.edu) 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/