Replies: 1 comment 3 replies
-
|
I managed to reproduce this behavior on the dev branch, but it seems horribly inconsistent. In my case the function lost its heredoc after being run thrice, then I had to source the file twice to get the function's heredoc to return to normal. It seems like a bug to me (maybe memory corruption?). EDIT: Now it won't reproduce at all. 99% certain it's a bug. ASan isn't throwing any errors though, so maybe it isn't a memory bug. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
not sure whether this could be an issue, so I first ask here. consider a script file holding
so this defines assorted functions when sourced for first time, but returns immediately if file is sourced 2nd time. the file is under development and changing frequently right now.
the problem I see is that after sourcing it for 1st time,
mydocfor some time correctly shows the manpage (the content of the HERE document) but at some point, sometimes, it stops doing that (possibly after me having edited the file, can't say for sure).issuing
typeset -fat this point shows the function body with an empty here document like so:Q1: why/how can here doc content vanish just so from the function definition?
if I do at that point
source myfilefor a second time and repeattypeset -f mydocthe function is back to normal content (full here doc part of function definition).Q2: why does the here doc content reappear despite script returning in line 1 and definitely not defining
mydoca second time (or so I would think)?Beta Was this translation helpful? Give feedback.
All reactions