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

Re: ZSH on ubuntu - bash completions



On Sun, Sep 02, 2012 at 07:45:10AM +1000, Sayth Renshaw wrote:
> On Sun, Sep 2, 2012 at 12:11 AM, Paul Johnson <paul@xxxxxxxx> wrote:
> > On Sat, Sep 01, 2012 at 08:20:52PM +1000, Sayth Renshaw wrote:
> >
> >> For installs that use Bash such as Pythonbrew, Perlbrew and Pythonz
> >> how can I change to have them use ZSH instead?
> >
> > I don't know about python, but for perlbrew I have the following in my
> > .zshrc:
> >
> > if [[ -e ~/perl5/perlbrew/etc/bashrc ]] then
> >     . ~/perl5/perlbrew/etc/bashrc  # perlbrew
> >     pb() { TEST_JOBS=9 perlbrew "$@" }
> > fi
> >
> > --
> > Paul Johnson - paul@xxxxxxxx
> > http://www.pjcj.net
> 
> Is that the default completion as you would use in Bash or did you
> alter something to get it to work?

Oops, sorry, I missed the completion part in the subject.

My solution allows perlbrew to work in zsh.  I haven't changed
~/perl5/perlbrew/etc/bashrc at all.  It doesn't implement any
completion.  I didn't even know there was completion for it and had
considered writing it myself.

Fortunately, I don't need to:

if [[ -e ~/perl5/perlbrew/etc/bashrc ]] then
    . ~/perl5/perlbrew/etc/bashrc
    . ~/perl5/perlbrew/etc/perlbrew-completion.bash
fi

With this completion works in zsh too.

-- 
Paul Johnson - paul@xxxxxxxx
http://www.pjcj.net



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