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

Very weird shell & sysread behavior



Hello,
the screenshot says it all:
http://psprint.blinkenshell.org/weird.png

In the while loop, $__tmp[-1] returns correct data.

After the loop, $__tmp[-1] nor $__tmp[@] contain any data.

More: when I provide the data (on the writing end) in following way:

        print -r -- "${(q)ZTSMAP[colsearch_pattern]}"$'\0'
        print -nr -- "${(j::)${__zts_hcw_found[@]/(#e)/--${num}-del--}}"

Then the issue occurs. But when I'll do it in following way:

        print -nr --
"${(q)ZTSMAP[colsearch_pattern]}"$'\0'"${(j::)${__zts_hcw_found[@]/(#e)/--${num}-del--}}"

I.e. through write of a single string – then the after-loop $__tmp
references contain correct data. What's going on?

-- 
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
Blog: http://zdharma.org



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