[Bash-completion-commits] [SCM] bash-completion branch, master, updated. c86a402077a26fbdbf98ccc99df142f9b517023a
Ville Skyttä
ville.skytta at iki.fi
Tue Jul 28 21:22:42 UTC 2009
The following commit has been merged in the master branch:
commit c86a402077a26fbdbf98ccc99df142f9b517023a
Author: Ville Skyttä <ville.skytta at iki.fi>
Date: Wed Jul 29 00:22:14 2009 +0300
Load "modules" completion if /etc/profile.d/modules.sh exists even if the "module" alias has not been defined (yet).
diff --git a/CHANGES b/CHANGES
index 4bee841..42dd758 100644
--- a/CHANGES
+++ b/CHANGES
@@ -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
diff --git a/contrib/modules b/contrib/modules
index 532cb9b..cd267d3 100644
--- a/contrib/modules
+++ b/contrib/modules
@@ -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 ()
{
--
bash-completion
More information about the Bash-completion-commits
mailing list