about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMax Voit <max.voit+mlzs@with-eyes.net>2021-07-08 19:47:41 +0200
committerOliver Kiddle <opk@zsh.org>2021-07-08 23:51:36 +0200
commitf1d4a07845a3210401f3619aa59a2653e415f99a (patch)
tree6567c509779a78add128f8075dddbf455ba3fad5
parentd634a3d333027561eb2d96120f3d40a876f1dd6f (diff)
downloadzsh-f1d4a07845a3210401f3619aa59a2653e415f99a.tar.gz
zsh-f1d4a07845a3210401f3619aa59a2653e415f99a.tar.xz
zsh-f1d4a07845a3210401f3619aa59a2653e415f99a.zip
49153: cut off .lua extension from module files that occurs when using lmod for module
-rw-r--r--ChangeLog6
-rw-r--r--Completion/Unix/Command/_module2
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 43129ecc2..1e5ea45bf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2021-07-08  Oliver Kiddle  <opk@zsh.org>
+
+	* Max Voit: 49153: Completion/Unix/Command/_module:
+	cut off .lua extension from module files that occurs
+	when using lmod for module
+
 2021-07-06  Suraj N. Kurapati  <sunaku@riseup.net>
 
 	* 49128 (github #76): Misc/vcs_info-examples: optimize
diff --git a/Completion/Unix/Command/_module b/Completion/Unix/Command/_module
index 2a4dba740..23cf0c589 100644
--- a/Completion/Unix/Command/_module
+++ b/Completion/Unix/Command/_module
@@ -85,7 +85,7 @@ _module_available_modules()
 {
   if [[ -n $MODULEPATH ]] && [[ ${+_available_modules} -eq 0 ]]
   then
-    _available_modules=(${$(find -L ${(e)=MODULEPATH//:/ } -type f -print 2>/dev/null | grep -v \\.version | sed -e 's,\('${${(e)=MODULEPATH//:/\/\\\|}%\\\|}'\),,g' -e 's,^/*,,g'):#*\~})
+    _available_modules=(${$(find -L ${(e)=MODULEPATH//:/ } -type f -print 2>/dev/null | grep -v \\.version | sed -e 's,\('${${(e)=MODULEPATH//:/\/\\\|}%\\\|}'\),,g' -e 's,^/*,,g' -e 's,\.lua$,,g'):#*\~})
   fi
 }