2008-09-07

Default tcsh behaviour in XUbuntu

I'm a newcomer to Ubuntu (Xubuntu, really). For the past few years my Linux distro of choice was Redhat and then Fedora. I became used to how things work on Fedora, like the behaviour or my favourite shell, tcsh.

The default filename completion behaviour of tcsh in Fedora (and in Ultrix and Digital Unix, as far as I can remember from my university days) is the following: the first press of [TAB] completes the filename up to the last common character in a set of files. The second press of [TAB] provides a list of possible choices, and reprints the command line to continue typing.

In Xubuntu, however, the default tcsh behaviour is that the first press of [TAB] provides already the list of possible choices. I wanted to change this, and I found the solution in the tcsh man page. At the tcsh prompt, type the following:

  • "unset autolist" to do without listing of filenames
  • "set autolist = ambiguous" to use the first [TAB] to complete filenames up to the common set of characters, and a second press of [TAB] to obtain a list of suggestions
  • "set autolist" to get the default behaviour in Xubuntu: The first [TAB] gives you the list of suggestions.