Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 417717 (bashcomp-spacepath)

Summary: [Tracker] bash completion files that fail with paths containing spaces
Product: Gentoo Linux Reporter: poletti.marco
Component: Current packagesAssignee: Gentoo Shell Tools project <shell-tools>
Status: UNCONFIRMED ---    
Severity: normal CC: totktonada.ru
Priority: Normal Keywords: Tracker
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 417925, 417927, 417715, 417921, 417923, 417929, 417945, 417947, 417949, 417951, 417953    
Bug Blocks:    

Description poletti.marco 2012-05-27 07:40:57 UTC
Many bash completions call 'compopt -f' or 'compopt -d' inside $() instead of _filedir, and that means that they don't work with filenames/dirnames that contain spaces.

I reported one instance:
https://bugs.gentoo.org/show_bug.cgi?id=417715

But then I discovered that there are a lot of completions that do this.

Just run:
* fgrep 'compgen -f' /etc/bash_completion.d/*
* fgrep 'compgen -d' /etc/bash_completion.d/*

To get an idea of how many completions have this problem.

One of:
_filedir
_filedir -d
_filedir "$EXTENSIONS"

should be used instead.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2012-05-28 00:32:19 UTC
Please file new bug reports for any bashcomp files that need fixing so that each bug can be assigned to the packages' respective maintainers. Make all those bugs block this one.

Also, please respect the quiet of this tracker bug unless talk is about the tracker itself.