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

Bug 395605

Summary: app-shells/bash-completion loads backup files (foo~)
Product: Gentoo Linux Reporter: Tanktalus
Component: Current packagesAssignee: Gentoo Shell Tools project <shell-tools>
Status: RESOLVED INVALID    
Severity: minor    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Tanktalus 2011-12-21 21:20:27 UTC
Because /etc/profile.d/bash-completion.sh loads ~/.bash_completion.d/*, and because foo~ comes after foo, bash-completion is overridding my current foo completion with the backup my editor makes.

Perhaps adding something like this?

if [[ $f == *~ ]] || [[ $f == *.bak ]]; then
  continue
fi

We may want to include other common backup suffixes, and there may be a better way to do this.

Reproducible: Always
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2011-12-22 15:28:32 UTC
Maybe you should persuade $EDITOR to use something more useful for backup files, like .${filename}.old or whatever. :)
Comment 2 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2011-12-22 16:53:48 UTC
(In reply to comment #0)

> We may want to include other common backup suffixes, and there may be a better
> way to do this.

There does not exist an exhaustive list of backup suffixes so this "issue" will never end. Therefore, I'm not inclined to add hacks for one person's issue.

By the way, you aren't suppose to be editting files in ~/.bash_completion.d/, there exists "eselect bashcomp enable foo" for a reason