Enable bash auto completion in cygwin

Just like bash in native unix environment, cygwin’s bash also support auto completion but somehow cygwyn doesn’t come with bash package. In my case the auto completion was not enabled yet, so I need to enable.

Check if you have /etc/bash_completion, then add it to your /etc/bash.bashrc

add this line

. /etc/bash_completion

or you for your safety add conditional check beforehand

if [-f /etc/bash_completion]; then
. /etc/bash_completion
fi

restart you bash and try to use your magic tab key.

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s