hobbes icon indicating copy to clipboard operation
hobbes copied to clipboard

'hi' should have an option to echo expressions as it executes them in scripts

Open kthielen opened this issue 6 years ago • 4 comments

kthielen avatar Jan 10 '19 00:01 kthielen

This would presumably use the same mechanism as issue #232. So it would probably make sense to use the same code as is in my PR #265 to print the latest when the option is set (for instance call echoCommandHistory by default when option set in eval loop, but only fetch the last element of the history i.e. what is currently being executed).

Any thoughts on what the option should be called/named from a user perspective? -x or -v seems to be used in unix-space.

hstalker avatar Mar 11 '19 10:03 hstalker

I'm not sure we want to implement this issue, but I entered it because we had a user request it.

It's tricky because he wants to echo each statement as it executes in a script, which isn't normally available to shell code.

kthielen avatar Mar 11 '19 10:03 kthielen

I see what you mean. Loaded modules just get compiled and then the machine code run, so we'd probably need to add some kind of compilation hook or something right? Even then, you wouldn't be able to get the appropriate lines output when things happen without some kind of debug metadata attached to the LLVM output (which might in itself be useful, but a lot of work for this particular issue).

hstalker avatar Mar 11 '19 11:03 hstalker

Yeah I think that for now it might be better to leave this in the backlog because it involves a scale of effort that's not proportional to the reward AFAICT. But I could be biased.

kthielen avatar Mar 11 '19 12:03 kthielen