obsidian-execute-code icon indicating copy to clipboard operation
obsidian-execute-code copied to clipboard

[FR] cancel command

Open hannesdelbeke opened this issue 2 years ago • 5 comments

in cmd i can press ctrl-C to cancel a running command. it'd be great if this plugin supported canceling a running command.

hannesdelbeke avatar Jan 04 '23 17:01 hannesdelbeke

We have this for Notebook Mode runtimes (JS, R, and Python), but we don't support it for other languages. That would be an easily implemented option.

Would something like this be okay, or would you prefer a button that's directly on the code block?

close-runtime

chlohal avatar Jan 20 '23 17:01 chlohal

a button on the code block would be ideal IMO. after clicking run, the run button could perhaps change to cancel. small comment: the bin icon is strange to me since it applies deleting, not cancelling. I guess you delete your session, but still feels weird

since the other solution requires more screenspace so less space for notes.

please note that I consider this feature request low priority , I've only had need for it a few times so far.

hannesdelbeke avatar Jan 29 '23 22:01 hannesdelbeke

You should be able to click the running indicator to stop a code block, and this should work for any language that uses the non-interactive executor, not just interactive ones like with notebook mode iirc. E.g. image

milan338 avatar Feb 11 '23 10:02 milan338

We have this for Notebook Mode runtimes (JS, R, and Python), but we don't support it for other languages. That would be an easily implemented option.

Would something like this be okay, or would you prefer a button that's directly on the code block?

close-runtime close-runtime

This is already nice, may I ask considering add an interupting command ? Many times, we just want to stop this cell, not the whole runtime.

jiewangjs avatar Feb 14 '23 03:02 jiewangjs

This is a problem for any shell commands that run indefinitely like ping. Only way to stop it is open up another terminal and kill it.

varappdev avatar Mar 01 '23 12:03 varappdev