← Back to team overview

touch-packages team mailing list archive

[Bug 1310855] Re: Bash Smart Completion expands to one file instead of all when using whildcards

 

Status changed to 'Confirmed' because the bug affects multiple users.

** Changed in: bash (Ubuntu)
       Status: New => Confirmed

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to bash in Ubuntu.
https://bugs.launchpad.net/bugs/1310855

Title:
  Bash Smart Completion expands to one file instead of all when using
  whildcards

Status in bash package in Ubuntu:
  Confirmed

Bug description:
  Using Bash Smart Completion, I found that sometimes when I use
  wildcards and then press tab, not all existing files are consideres
  for expansion but only the first one. This is a very dangerous
  behaviour because people tend to think there is only one file matching
  the pattern.

  Steps to reproduce (bash shell with smart completion enabled):

  1. Create files a.x and b.x
      $ touch a.x
      $ touch b.x
  2. Enter "ls *x" (without quotes)
  3. Press tab
  4.
      Expected: Shell doesn't expand because there are two files matching the pattern
      Instead, the shell expands to "ls a.x"

  Shell 'screenshot', to show the difference:

  $ # smart completion is enabled
  $ touch a.x     # create test files
  $ touch b.x
  $ ls *.x<tab>
  $ ls a.x      # shell expanded *.x to a.x

  You can simply reproduce the expected behavoiur when you disable smart
  completion:

  $ complete -r  #disable smart completion
  $ touch a.x     # create test files
  $ touch b.x
  $ ls *.x<tab><tab>
  a.x  b.x
  $ ls *.x

  My System:

  Ubuntu 14.04 LTS with current updates
  Linux 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

  bash --version
  GNU bash, version 4.3.8(1)-release (x86_64-pc-linux-gnu)

  Package: bash
  Architecture: amd64
  Version: 4.3-6ubuntu1

  Package: bash-completion
  Architecture: all
  Version: 1:2.1-4

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1310855/+subscriptions