Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: Re: Compsys and KSH_AUTOLOAD
- X-seq: zsh-workers 19786
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: PATCH: Re: Compsys and KSH_AUTOLOAD
- Date: Fri, 16 Apr 2004 17:25:38 +0000
- In-reply-to: <13987.1082134179@xxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <1040410174430.ZM10891@xxxxxxxxxxxxxxxxxxxxxxx> <1170.1081778412@athlon> <040412085942.ZM19035@xxxxxxxxxxxxxxxxxxxxxxx> <3571.1081806187@athlon> <1040413053826.ZM20012@xxxxxxxxxxxxxxxxxxxxxxx> <18035.1081870188@xxxxxxxxxxxxxxxxxxxxx> <1040413175111.ZM21011@xxxxxxxxxxxxxxxxxxxxxxx> <13987.1082134179@xxxxxxxxxxxxxxxxxxxxx>
On Apr 16, 6:49pm, Oliver Kiddle wrote:
}
} Why do export and readonly accept -f arguments? Is that just to avoid
} errors on bash scripts? Any reason why we shouldn't implement readonly
} functions.
It could get pretty tricky to have a readonly autoloaded function. Does
the function become readonly only after the autoload occurs? What *can*
one change about a readonly function -- can one `typeset -t' it? If it
hasn't been loaded yet, can the new ksh/zsh autoload flags be changed?
BTW, independent of readonly, what do +z and +k mean? Revert the
function to using the current global ksh_autoload setting? What happens
if you use +k on a function that has -z ?
} On 13 Apr, Bart wrote:
} >
} > } > Here's a possibly-silly idea: Those flags could be made to apply
} > } > to arrays as well as functions
}
} [If] the math modulo operator is being used on an index variable, zero
} based arrays are more useful. Having `-z' mean not zero-based might be
} confusing though.
Yes, that's true. Having -z mean something different for arrays and
functions might be confusing, too, unless -k is invalid for arrays, but
that might be more confusing than having -k mean zero-based and -z not
valid. Argh, my head hurts.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author