Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 395605 - app-shells/bash-completion loads backup files (foo~)
Summary: app-shells/bash-completion loads backup files (foo~)
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal minor (vote)
Assignee: Gentoo Shell Tools project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-21 21:20 UTC by Tanktalus
Modified: 2011-12-22 16:53 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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