[Bug 1637193] Re: broken when directory contains files with exclamation mark (!)

Andrey Sidorov andrey.desman at gmail.com
Tue Nov 29 18:48:53 UTC 2016


Fixed by extra-quoting $xspec.

$ diff -u bash_completion /usr/share/bash-completion/bash_completion
--- bash_completion	2016-11-29 21:48:11.787460446 +0300
+++ /usr/share/bash-completion/bash_completion	2016-11-29 21:44:51.755183840 +0300
@@ -1845,7 +1845,7 @@
     xspec="$matchop($xspec|${xspec^^})"
 
     toks+=( $(
-        eval compgen -f -X "!$xspec" -- "\$(quote_readline "\$cur")" | {
+        eval compgen -f -X "\'!$xspec\'" -- "\$(quote_readline "\$cur")" | {
         while read -r tmp; do
             [[ -n $tmp ]] && printf '%s\n' $tmp
         done

-- 
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/1637193

Title:
  broken when directory contains files with exclamation mark (!)

Status in bash-completion package in Ubuntu:
  New

Bug description:
  typing vim and hitting tab displays no local files if the directory
  contains a file that starts with an exclamation mark. See also a
  question by another user http://askubuntu.com/questions/840866/vi-tab-
  completion-works-only-in-some-directories.

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



More information about the foundations-bugs mailing list