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

Re: var=$( typeset "$1" ) ... not within a function.




Oh, I see what you mean. I confused you, sorry.
It's easy to do.
typeset_silent kicks in only when you do `typeset foo` and there is
already `foo` in scope. Here, when have `typeset USER` in a function,
there is no `USER` in scope, so a new parameter is defined.
I understand.  Mind, I wasn't trying to create a parameter, just return it's value if set, which is what the prior test is for. typeset scares me because sometimes it's a passive reporter, other times dangerously active, in this case I was just looking for information but it seems like I created a parameter -- which '-m' seems to prevent.  It's all rather Byzantine but I do at least get it.  Many thanks.

I cannot offer a solution because I don't know what you are trying to
achieve. No small change will make this code look reasonable.

It's not reasonable, it's a boiled down minimal code to convey my problem which is now solved.  I appreciate your patience!


Roman.





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