[kwlug-disc] tab completion in SLES 11 seems intermittent

Robert P. J. Day rpjday at crashcourse.ca
Thu Sep 24 03:49:27 EDT 2009

  a puzzler -- i just installed SuSE linux enterprise server 11 (SLES
11) on one of my gateway laptops, fired up a gnome terminal and,
curiously, tab completion for filenames seems arbitrary.

  i'm sitting in the /boot directory, which contains (among other

  initrd -> (the above)

if i run, say,

  $ ls ini<TAB>

sure enough, completion takes it out to

  $ ls initrd

at which point i have to help, of course.

  OTOH, i tried

  $ gunzip -c ini<TAB>

but nothing happened.  the tab completion worked with the "ls"
command, but not "gunzip".  i'm confused.  i tried again with the
"file" command -- works fine.

  so what's different about "gunzip"?  why should tab completion be
related to one's choice of command?  or am i missing something
obvious?  (wouldn't be the first time.)

  whoops, hang on, more weirdness.  if i don't type *any* part of the
prefix, i normally expect to get all possible file objects presented.
if i type:

  $ ls <TAB>

i get presented with the 14 files/dirs in the /boot directory,
including the "initrd" ones.  but if, instead, i type:

  $ gunzip <TAB>

i get only six!  that would be /boot, /grub, and the four files there
that have a ".gz" suffix.  huh?  it's as if tab completion is trying
to do the completion intelligently, by giving me the stuff only with
.gz suffixes, but that doesn't explain the directories.

  what's happening here?  i've never seen anything like it.


Robert P. J. Day                               Waterloo, Ontario, CANADA

        Linux Consulting, Training and Annoying Kernel Pedantry.

Web page:                                          http://crashcourse.ca
Twitter:                                       http://twitter.com/rpjday

More information about the kwlug-disc mailing list