Command line auto complete tab key not work in terminal for Ubuntu
I had this problem using XFCE and TigerVNC: pressing tab just switched between the terminals I had open. It was solved by following the directions given in the link @Jonas provided: http://how-to.cc/fix-bash-command-line-completion. I will copy a few pieces in here in case the link should ever be broken.
Step 1:
Make sure that your .bashrc
file contains something like
if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
so that a file containing bash completion info is actually sourced. In my case, /etc/bash_completion
pointed to /usr/share/bash-completion/bash_completion
which contained the stuff to set up. For reference, the end of my .bashrc
looked like this:
if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
elif [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
fi
Step 2:
Disable the behaviour of tab changing windows. This is done in the file ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml
by changing the line
<property name="<Super>Tab" type="string" value="switch_window_key"/>
to
<property name="<Super>Tab" type="empty"/>
Step 3:
Reboot or restart your VNC server (XFCE).
Try this,
- Open the
Xfce Application Menu > Settings > Window Manager
- Click on the
Keyboard
Tab - Clear the
Switch window for same application setting
Refer here.
The XFCE Terminal has kidnapped the tab key for a feature of it's own, tab/windows switching. Instead the normal tab is sent if you press CTRL-tab.
I say this is a mistake on the design of XFCE Terminal emulator, but theres no way I know to get rid of the kidnapping of tab!