No tab completion when using quote (")

Bug #298799 reported by Bruce van der Kooij on 2008-11-16
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
bash-completion (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: bash-completion

From what I remember there used to be working tab completion for files when starting the argument with a quote ("). This is especially useful when one works with files with spaces. Currently completion only works with a single quote ('). Here's an example of what I mean:

$ touch "foo bar"
$ mv "<tab>
foo bar
$ mv "f<tab>
foo bar

The behavior when using a single quote (') is identical. Is there a specific reason for this?

ProblemType: Bug
Architecture: i386
DistroRelease: Ubuntu 8.10
Package: bash-completion 20060301-4ubuntu1
PackageArchitecture: all
ProcEnviron:
 LC_TIME=nl_NL.utf8
 PATH=/home/username/bin:/home/username/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: bash-completion
Uname: Linux 2.6.27-7-generic i686

Bruce van der Kooij (brucevdk) wrote :
Jignesh Borad (jigneshborad) wrote :

I checked this and confirm that it is happening as described in the bug.

I too am not sure if there is any reason behind this. Would be glad to hear from someone.

Changed in bash-completion:
status: New → Confirmed
YoBoY (yoboy-leguesh) wrote :

I can confirm too.

I have run some more tests.

First one, i have deactivated the bash-completion to see how bash work with quotes "

USE CASE:
$ touch "foo bar"
$ mv "<tab> # work
foo bar
$ mv "f<tab> # work
foo bar
$ mv '<tab> # work
foo bar
$ mv 'f<tab> # work
foo bar
$ nano "<tab> # work
foo bar
$ nano "f<tab> # work
foo bar

After that, i reactivated the bash-completion and now :
USE CASE:
$ touch "foo bar"
$ mv "<tab> # don't work
$ mv "f<tab> # don't work
$ mv '<tab> # work
foo bar
$ mv 'f<tab> # work
foo bar
$ nano "<tab> # work
foo bar
$ nano "f<tab> # work
foo bar

This is strange that internal commands are not working like expected, but other programs seems to work without this issue (only tested with nano)

Peter Cordes (peter-cordes) wrote :

works for me, at least after applying the fix for bug 1387057 (properly quoting "$quoted"). On Trusty. This is probably the same bug.

 Or maybe not: I'm seeing
$ echo ./"./foo[TAB] turns into
$ echo ./"././foo

 every [TAB] adds another ./

foo does get expanded to the longest common prefix of multiple possible matches, though.

 So programmable completion still isn't exactly rock solid with quotes.

Peter Cordes (peter-cordes) wrote :

Yeah, I'm not seeing the OP's bug at all, even when sourcing Trusty's unmodified bash_completion.

The directories inside quotes problem is a different thing. Marked as fixed, prob. by upstream ages ago.

Changed in bash-completion (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers