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

Re: Using completion code from bash



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)

(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
    
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.

-- 



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