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

Re: [BUG] parameter Module - functions_source associative array not working



On 16 Jun 2018, at 22:12, Francisco de Zuviría Allende <franciscodezuviria@xxxxxxxxx> wrote:
>Versions 5.3 and 5.5
>
>Can't get functions_source to work.

AFAIK it wasn't introduced until 5.4, so that's probably expected in the former
case.

I can confirm that it behaves strangely in 5.4.2 and 5.5.1 — that seems to be
because it's not marked for auto-loading. The included patch fixes it (along
with dis_functions_source and usergroups); in the mean time you can kick it into
existence by running `zmodload -F zsh/parameter +p:functions_source` (or just
reloading the module entirely).

dana


diff --git a/Src/Modules/parameter.c b/Src/Modules/parameter.c
index 10c47d214..783c36df3 100644
--- a/Src/Modules/parameter.c
+++ b/Src/Modules/parameter.c
@@ -2190,6 +2190,7 @@ static const struct gsu_array dirs_gsu =
 static const struct gsu_array historywords_gsu =
 { histwgetfn, arrsetfn, stdunsetfn };
 
+/* Make sure to update autofeatures in parameter.mdd if necessary */
 static struct paramdef partab[] = {
     SPECIALPMDEF("aliases", 0,
 	    &pmraliases_gsu, getpmralias, scanpmraliases),
diff --git a/Src/Modules/parameter.mdd b/Src/Modules/parameter.mdd
index a91a5dc09..f71c17a72 100644
--- a/Src/Modules/parameter.mdd
+++ b/Src/Modules/parameter.mdd
@@ -2,6 +2,6 @@ name=zsh/parameter
 link=either
 load=yes
 
-autofeatures="p:parameters p:commands p:functions p:dis_functions p:funcfiletrace p:funcsourcetrace p:funcstack p:functrace p:builtins p:dis_builtins p:reswords p:dis_reswords p:patchars p:dis_patchars p:options p:modules p:dirstack p:history p:historywords p:jobtexts p:jobdirs p:jobstates p:nameddirs p:userdirs p:aliases p:dis_aliases p:galiases p:dis_galiases p:saliases p:dis_saliases"
+autofeatures="p:parameters p:commands p:functions p:dis_functions p:functions_source p:dis_functions_source p:funcfiletrace p:funcsourcetrace p:funcstack p:functrace p:builtins p:dis_builtins p:reswords p:dis_reswords p:patchars p:dis_patchars p:options p:modules p:dirstack p:history p:historywords p:jobtexts p:jobdirs p:jobstates p:nameddirs p:userdirs p:usergroups p:aliases p:dis_aliases p:galiases p:dis_galiases p:saliases p:dis_saliases"
 
 objects="parameter.o"



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