shopt causes bash completion to stop working.
2011-01-25
164 words
1 min read
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.
Related articles
- Siegfried Gevatter: My dot files (Tips and Tricks for Bash & co.) (bloc.eurion.net)
- bash 4.0 – new feature mapfile (amit-agarwal.co.in)
- Dealing with bash history (ghacks.net)
Related Articles:
- 2011/01/05 Shell Scripting
- 2010/12/23 Bash Script Beautifier
- 2010/12/26 Empty a file
- 2010/11/20 Broadcast your shell thru port 5000
- 2010/09/24 bash script to run a command and take screenshot in every loop.
Authored By Amit Agarwal
Amit Agarwal, Linux and Photography are my hobbies.Creative Commons Attribution 4.0 International License.