Package: bash
Version: 3.1-2
Severity: normal

When I try to complete, for example "fi" to "file " by hitting tab, I don't see 
"file 1" and "file 2" as options, I see "1", "2" and 
"file" as separate options:

  $ mkdir /tmp/dir
  $ cd /tmp/dir
  $ touch 'file 1' 'file 2' 'file 3'
  $ bzip2 fi<TAB><TAB>
  1     2     3     file

I compared this with the behaviour for "gzip", but gzip was fine, because the 
gzip completion code specifies a different IFS value.  The 
following patch makes bzip2 complete as well as gzip does:

--- Backup/bash_completion.~1~  2006-03-10 03:09:33.000000000 +0100
+++ bash_completion     2006-03-10 03:20:24.000000000 +0100
@@ -3286,7 +3286,7 @@
 have bzip2 &&
 _bzip2()
 {
-       local cur prev xspec
+       local cur prev xspec IFS=$'\t\n'
 
        COMPREPLY=()
        cur=${COMP_WORDS[COMP_CWORD]}

However, neither works well if the file names contain tabs.




-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-1-686
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages bash depends on:
ii  base-files                    3.1.10     Debian base system miscellaneous f
ii  debianutils                   2.15.2     Miscellaneous utilities specific t
ii  libc6                         2.3.5-13   GNU C Library: Shared libraries an
ii  libncurses5                   5.5-1      Shared libraries for terminal hand

bash recommends no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to