shopt causes bash completion to stop working.

Couple of days, I added some scripts to my bash startup and suddenly realized that bash completions stopped working. This is tricky situation in bash to figure out what went wrong. So, I set my foot down to make sure that I find out the culprit. Thus I started with method of elimination. So, I started with nothing in .bashrc and kept adding my stuff in batches, until the said feature was broken. Once that happened I started removing the added ones, one by one, until my completion started working again.

So, Finally I got my culprit, which was:

shopt -s  dotglob extglob nullglob promptvars

In your case, the feature broken may be some other feature or the culprit may be some other statement, but the above procedure will help you identify the problem without much struggle.

Enhanced by Zemanta

1 thought on “shopt causes bash completion to stop working.”