Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Using completion code from bash

Am Dienstag, 25. März 2008 schrieb ext Bart Schaefer:
> On Mar 25, 10:28am, Dirk Heinrichs wrote:
> }
> } So I did
> }
> } autoload bashcompinit
> } bashcompinit
> } source bashrc_cc
> When I do that I get
>     ERROR: Unable to load ClearCase auto-completion functions
>     Current Bash version is ., need 2.05 or greater
> so you must have done *something* else.  I had to do
>     setopt ksharrays
>     BASH_VERSINFO=(2 05b)

Oh, yes. Sorry forgot to mention. I commented out the test for the bash 
version to get it to be sourced w/o error.

> (The BASH_VERSINFO variable is set by the _bash_complete wrapper, but
> not by bashcompinit.  Maybe we need a "bash_source" helper function or
> something.)
> } but got no completion. Did I miss something?
> After I do the above I have completions for vmore, vcd, vdiff, and vcat
> that were not previously present.  In order for these to complete
> correctly, you need
>     setopt complete_aliases

Hmm, didn't even know about these ones, what I am after is cleartool and 

> because bashrc_cc creates aliases for them and without complete_aliases
> zsh will first resolve the aliases to the underlying commands and then
> do completion, bypassing _bash_complete.

OK, I get to the first level (ct <command>), but the second level then fails 
(i.e. ct setview <viewtag>, the completion for viewtags gives an error 
message: _complete_ct:local:16: not an identifier: some_view_tag).

Maybe I try to write my own completion module...


Dirk Heinrichs          | Tel:  +49 (0)162 234 3408
Configuration Manager   | Fax:  +49 (0)211 47068 111
Capgemini Deutschland   | Mail: dirk.heinrichs@xxxxxxxxxxxxx
Wanheimerstraße 68      | Web:  http://www.capgemini.com
D-40468 Düsseldorf      | ICQ#: 110037733
GPG Public Key C2E467BB | Keyserver: www.keyserver.net

Attachment: signature.asc
Description: This is a digitally signed message part.

Messages sorted by: Reverse Date, Date, Thread, Author