Disable bash tab completion
Solution 1
put
set disable-completion on
string in ~/.inputrc
and restart your shell. it will disable completion at all.
Solution 2
Dennis' solution
bind 'set disable-completion on'
can be done on the fly in Bash as well. You do not need to put it in .bashrc.
Musta's solution (bash --noediting) works but also disables command line editing.
Another way is
bind -u complete
(unset key binding associated with 'complete')
http://www.gnu.org/software/bash/manual/bashref.html, 4.2 Bash Builtin Commands.
Solution 3
To disable Bash tab completion only temporarily you can start a Bash with the --noediting
option:
alias noed='bash --noediting'
Related videos on Youtube
Comments
-
Tyilo over 1 year
Is it possible to disable bash's autocomplete on pressing tab?
The reason I want to do this is that I often paste code from an editor where I use the tab character instead of a number of spaces for indention, into my terminal.
And no, you can't convince me to use spaces instead of tabs.
-
Gilles 'SO- stop being evil' over 12 yearsIn zsh, the Tab key inserts a tab if you press it at the beginning of a line (before any non-whitespace character). I don't think bash can be programmed for that (you can bind a key to a bash function, but AFAIK you can't trigger a completion from that bash function).
-
-
yrk over 12 yearsnot only in bash though...
-
Brian Rasmussen over 12 yearsTo have it only affect Bash, instead of including that line in your
~/.inputrc
file, add this to the appropriate shell startup file:bind 'set disable-completion on'
-
TheDudeAbides over 5 yearsThe correct answer for the question "how do I temporarily disable Bash completion?" This helps a lot when you're navigating through a directory with 81,000+ files and you can't even Ctrl+C without waiting two minutes for Bash to come back with a prompt.
-
db-inf over 2 years
disable-completion
is a readline option, not a bash option. As far as I can check, it does not disable tab completion when copying code to a bash shell.