It seems that bash doesn't want to autocomplete commands (what's annoying me right now is not autocompleting apt-get) when I'm logged into my machine from SSH. Is there some setting that will allow bash to autocomplete inside an ssh session?
source /etc/bash_completion should do the trick (run it in the shell within the SSH session).
Long story: in order for bash completion to work, you have to tell
bash how to complete each command's arguments. This requires a long sequence of invocations of the
bash built-in command
complete; therefore, they are usually collected in a separate script (or several ones in
/etc/bash.complete.d/*) that loads them all.
Being a regular shell script, you can always load the
bash_completion in any shell startup script (
- section Programmable Completion in the man page
- help text for the