difference in bash tab completion between fedora and SLES11

Robert P. J. Day rpjday at crashcourse.ca
Thu Sep 24 07:58:56 UTC 2009


  i'm confused -- i just installed suse enterprise system 11 (SLES 11)
on a laptop and wanted to check the contents of the initrd file.  so,
as i've done on fedora many times, i popped into /boot and typed:

  $ gunzip -c ini<TAB>

to let tab completion fill out the rest of the "initrd" file (or at
least as much as it could until i needed to help out).

  on fedora 11, this would work just fine -- tab completion blindly
sees what matches and goes from there.

  on SLES 11, though, tab completion did *nothing*.  it just sat
there, even though there were two objects in /boot that started with
that prefix.

  i tried the same tab completion with "ls" and "file", and it worked
fine.  but not with "gunzip".  so, as a test, i just did:

  $ gunzip -c <TAB>

and, to my surprise, all i was offered as possibilities were 6 out of
14 objects in that directory -- the two directories, and the four
files that ended with .gz.  huh?

  it appears that tab completion is trying to be intelligent about
this (gunzip should be offered only .gz files and *directories*?), and
tying the completion possibilities to the command.  i've never seen
this before.  bash feature?  config file to define this?

rday
--

========================================================================
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 fedora-list mailing list