[Bug 1387057] Re: wildcard incorrect completion

Dabe Murphy dabe at dabe.com
Tue Jan 5 21:22:19 UTC 2016


In addition to the unquoted "$quoted" that @peter-cordes mentioned,
there's another bug in the _filedir() function:

    --- /usr/share/bash-completion/bash_completion--OLD 2015-08-19 19:58:22.734667377 -0500
    +++ /usr/share/bash-completion/bash_completion      2016-01-05 15:56:50.442988910 -0500
    @@ -604,6 +604,8 @@
             # 2>/dev/null for direct invocation, e.g. in the _filedir unit test
             compopt -o filenames 2>/dev/null
             COMPREPLY+=( "${toks[@]}" )
    +    else
    +        compopt -o bashdefault 2>/dev/null
         fi
     } # _filedir()

This lets you eat your cake and have it, too: you can keep your "shopt
-s progcmp" bash_completion AND if that doesn't find a match, it will
fall back to using bash's default glob-handling.

(This also solves Bug 1361404)

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to bash-completion in Ubuntu.
https://bugs.launchpad.net/bugs/1387057

Title:
  wildcard incorrect completion

Status in bash-completion package in Ubuntu:
  Confirmed

Bug description:
  steps to reproduce (verified on trusty)

  $ touch /tmp/file01.txt;touch /tmp/file11.txt
  $ file /tmp/fileTAB
  file01.txt     file02.txt
  $ file /tmp/file*TAB

  the last command will then incorrectly complete to

  $ file /tmp/file01.txt

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



More information about the foundations-bugs mailing list