1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-01 21:51:40 +02:00

49153: cut off .lua extension from module files that occurs when using lmod for module

This commit is contained in:
Max Voit 2021-07-08 19:47:41 +02:00 committed by Oliver Kiddle
parent d634a3d333
commit f1d4a07845
2 changed files with 7 additions and 1 deletions

View file

@ -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

View file

@ -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
}