Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to have MacPorts' tab completion in Zsh

I get the following in including MacPorts' Bash tab completion to Zsh

/opt/local/etc/bash_completion:[:48: unrecognized condition: `2'
[ -- cut -- ]
/opt/local/etc/bash_completion:[:62: unrecognized condition: `2'
/opt/local/etc/bash_completion:69: command not found: shopt
[ -- cut -- ]
/opt/local/etc/bash_completion:3015: command not found: complete
/opt/local/etc/bash_completion:3062: parse error near `&&'

How can you have MacPorts' tab completion in Zsh?

like image 429
Léo Léopold Hertz 준영 Avatar asked Apr 30 '09 05:04

Léo Léopold Hertz 준영


2 Answers

You might want to try zsh completion for zsh. bash_completion is for Bash, surprisingly enough.

edit It sounds like you might be looking specifically for completion support for the port command. It looks like the MacPorts zsh package has a +mp_completion variant that will install completion for the port command:

sudo port install zsh +mp_completion
like image 135
Brian Campbell Avatar answered Nov 09 '22 23:11

Brian Campbell


Waking up that old question I just found doing some researchs to mention the wonderful oh-my-zsh utility intended for OSX that brings easily tab completion to port amongst others and also many many other nice stuff. A must have imho :)

like image 36
Vincent Guerci Avatar answered Nov 10 '22 01:11

Vincent Guerci