The Computer Oracle

Disable Bash's programmable autocompletion (based on command)

--------------------------------------------------
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: Quiet Intelligence

--

Chapters
00:00 Disable Bash'S Programmable Autocompletion (Based On Command)
00:27 Accepted Answer Score 5
00:35 Answer 2 Score 8
00:49 Answer 3 Score 1
01:02 Answer 4 Score 24
01:33 Thank you

--

Full question
https://superuser.com/questions/421397/d...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#bash #autocomplete

#avk47



ANSWER 1

Score 24


shopt -u progcomp

will disable program based completion and TAB will do regular file/dir completion again. You can do this on a shell by shell basis (or put in in .bashrc for all shell in your account) rather than remove the bash-completion package for everyone. Running complete -r removes all program completion settings so there are none defined. This means if you want to turn it on again you have to redefine them all again. Whereas if you used shopt -u progcomp to turn it off, you can just run shopt -s progcomp to turn it back on again.




ANSWER 2

Score 8


Another way to disable it on a per-user basis is by doing complete -r in your .bashrc file. Type help complete for more information.




ACCEPTED ANSWER

Score 5


Remove the bash-completion package.




ANSWER 4

Score 1


Just removing the package is not enough, you also want to purge the files:

sudo apt-get --purge remove bash-completion