BTS

Message5859

Author Xk2c
Recipients Xk2c
Date 2016-05-08.13:26:31
Content
Hello hopefully-not-so-grml-today folks,   ;)

i was looking at zrcautoload() and the various cases where it would be used.
When i came down to where run-help is initialised i thought it would be better
to not hardcode functions names and was looking for a general solution for that.
After having found that in the fine manual (actually several hours later....) it
occured that zrcautoload() itself could be improved.
And so here you go:

chnagelog:
* MOD: zrcautoload()
       * make it multi argument aware
         returns 0 when all PARAMETERS had been autoloaded
         returns 1 when at least one PARAMETER could not be found for autoloading
         returns 2 when autoload itself had some problem
       * ZSHified, i.e. use globbing instead of looping
* MOD: with the modified zrcautoload() from above a few use cases could be optimized
* FIX: zrcautozle() drop superflous variable 'fnc'
* FIX: run-help, do not hardcode function names, there were allready some missing
       instead use what is avail on system

As usual i tried hard not to introduce regressions.
Actually i left some debuiing echos in the code.
This should make it easier for you to review and in case to trace down a problem.

kind regards,

Thilo
Files
File name Uploaded
0001-PATCH-zrcautoload-improved-and-ZSHified.patch Xk2c, 2016-05-08.13:26:31
History
Date User Action Args
2016-05-08 13:26:32Xk2csetrecipients: + Xk2c
2016-05-08 13:26:32Xk2csetmessageid: <1462713992.34.0.136899724111.issue2194@bts.grml.org>
2016-05-08 13:26:32Xk2clinkissue2194 messages
2016-05-08 13:26:31Xk2ccreate