cc: [EMAIL PROTECTED]
Subject: Re: [ast-developers] typeset +f and command substitution
--------
> The following function behaves somewhat peculiar:
>
> function f
>
> {
> ksh --version # 1993-12-28 s+
> typeset p t
>
> p=f
> typeset +f $p # OK
> t=$(typeset +f $p)
> print "$t" # ?? empty
>
> set -- f
> typeset +f $1 # OK
> t=$(typeset +f $1)
> print "$t" # OK
> }
>
> The crucial part is the assignment 't=$(typeset +f $X)'. If X is a normal
> name, and $X is "f", the result is empty. If X is 1, and $1 is "f", the
> result is whatever 'typeset +f f' outputs.
>
> Looks like a bug to me. Or are normal variables and positional parameters
> supposed to behave different in this context?
>
> Regards,
> Bernd
>
This was a bug that was reported earlier and I had fixed in an internal
ksh93t because I thought that ksh93s+ was frozen. The problem is that
the subshell was not able to see the function definition from the parent
shell and this has been fixed.
Glenn Fowler said that he will put this fix into ksh93s+ into the
final offical ksh93s+ release which will be posted Monday.
David Korn
[EMAIL PROTECTED]
_______________________________________________
ast-developers mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-developers