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

Re: PATCH: Add jobdirs association to parameter module

Felix Rosencrantz wrote:
> This proposed patch adds a new association to the parameter module
> called jobdirs.  This provides an association with job numbers and the
> directories in which the jobs were started.
> @@ -1889,8 +1969,7 @@
>             if (def->hsetfn)
>                 def->pm->sets.hfn = def->hsetfn;
>         } else {
> -           if (!(def->pm = createparam(def->name, def->flags | PM_HIDE |
> -                                       PM_REMOVABLE)))
> +           if (!(def->pm = createparam(def->name, def->flags | PM_HIDE)))
>                 return 1;
>             def->pm->sets.afn = def->setfn;
>             def->pm->gets.afn = def->getfn;

What is this chunk for?  It's going to mean the parameters are permanently
stuck in the parameter table, even if the module is unloaded, and if the
module is reloaded the parameters won't be.  Sven just fixed this a week or
so ago.

It's a shame we didn't have more specific names for parameters, since the
parameter module is quiet heavily used in completion, so there is quite a
lot of name space pollution.  They stop being special if made local, but
it's still a problem.  The ksh mechanism ${.param.jobdirs} would be
excellent for this.

Peter Stephenson <pws@xxxxxxxxxxxxxxxxxxxxxxxx>

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