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

Re: unexpected unmodified variable




On 2022-10-06 12:28, Peter Stephenson wrote:

$(...) causes a shell to be forked --- it runs in a different process,
prints its output to somewhere that's collected by the main shell,
then exits.  So the internal effects disapper.


Returning stuff in a sane way is a real weakness in shells.

pws

Thanks Peter, I sorta suspected it was one of those subshell issues.  I must have gotten the invocation wrong cuz I had no luck making the variable global.  I ended up sending the output to a bleeding file and then rereading that.  There otta be a better way.







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