I found a command a couple of months ago that made my bash history auto-complete on what\'s already on the line when pressing the up arrow:
$ vim fi
You may need to enabled bash completion.
Check
/etc/profile/etc/bash.bashrc~/.bashrcto see if any of the above files source /etc/bash_completion. i.e.
. /etc/bash_completion
If /etc/bash___completion is not sourced by any of the above files you will need to add it to one of them.
If you want all bash users on your machine to have bash completion, source /etc/bash_completion from /etc/bash.bashrc.
If it's just you who wants bash completion, source /etc/bash_completion from your ~/.bashrc.