Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: _module



Hi,

as some of you might know, there are two implementations of the Modules
system, C and Tcl versions. They should be compatible and I had done my
testing with C version but now I happened to try also the Tcl version.
It turned out that the attached small patch was needed.

Please apply, sorry for the inconvenience.

Thanks!


 
____________________________________________________________________________________
No need to miss a message. Get email on-the-go 
with Yahoo! Mail for Mobile. Get started.
http://mobile.yahoo.com/mail 
--- zsh/Completion/Unix/Command/_module.orig
+++ zsh/Completion/Unix/Command/_module
@@ -85,7 +85,7 @@
 {
   if (( [[ -n "$MODULEPATH" ]] && [[ ${+_available_modules} -eq 0 ]] ));
   then
-    _available_modules=($(find ${(e)=MODULEPATH//:/ } -xtype f -print 2>/dev/null | grep -v \.version | sed -e 's,\('${${(e)=MODULEPATH//:/\/\\\|}%\\\|}'\),,g'))
+    _available_modules=($(find ${(e)=MODULEPATH//:/ } -xtype f -print 2>/dev/null | grep -v \.version | sed -e 's,\('${${(e)=MODULEPATH//:/\/\\\|}%\\\|}'\),,g' -e 's,^/*,,g'))
   fi
 }
 


Messages sorted by: Reverse Date, Date, Thread, Author