bash-completion functions should be prefixed with __bash_completion__ to stop them conflicting with commands

Bug #1327586 reported by Simon Arlott
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
bash-completion (Ubuntu)
New
Undecided
Unassigned

Bug Description

All of the functions defined in the /usr/share/bash-completion/completions/* files end up in the shell's global function namespace.

This causes them override lookups for commands in $PATH, which means that any command starting with an underscore is at risk of being overridden by a completions script.

This caused my $HOME/bin/_ssh script to stop being called after the /usr/share/bash-completion/completions/ssh was loaded. The _ssh function was being called instead of my script.

If the function names were prefixed with __bash_completion__ then they would be less likely to conflict with any real commands or user defined functions in a user profile file.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.