Load "modules" completion if /etc/profile.d/modules.sh exists even if the "module" alias has not been defined (yet).

This commit is contained in:
Ville Skyttä 2009-07-29 00:22:14 +03:00
parent e7af368e9b
commit c86a402077
2 changed files with 5 additions and 1 deletions

View File

@ -96,6 +96,8 @@ bash-completion (1.x)
* Associate *.po with poedit, gtranslator, kbabel, and lokalize.
* Add xz, xzcat, xzdec, and unxz completion.
* Add lzcat and unlzma completion.
* Load "modules" completion if /etc/profile.d/modules.sh exists even if
the "module" alias has not been defined (yet).
[ Todd Zullinger ]
* Make yum complete on filenames after install, deplist, update and upgrade

View File

@ -17,7 +17,9 @@
# module command is an alias, and the `module avail' command returns
# its output as stderr.
type module &>/dev/null && {
# Test for existence of /etc/profile.d/modules.sh too because we may end up
# being sourced before it and thus before the `module' alias has been defined.
have module || [ -f /etc/profile.d/modules.sh ] && {
_module_list ()
{