vscode-edit-with-shell icon indicating copy to clipboard operation
vscode-edit-with-shell copied to clipboard

(bug) Hangs after non input-consuming command (such as pwd, echo, date)

Open dpercy opened this issue 2 years ago • 0 comments

Some commands like pwd or date are useful when editing but don't consume any input. It looks like the plugin hangs the first time you run one of these.

For example:

  1. Run fmt and see it succeed.
    • The prompt disappears.
    • The text is updated.
  2. Run pwd and see it hang.
    • The prompt stays visible.
    • The text is unchanged.
  3. Run fmt again and see it hang.

Running Cmd-Shift-P > Developer: Reload Window fixes it.

I also notice that cat > tmp ; pwd succeeds, so the problem seems to be with whether the input is consumed, rather than pwd in particular.

Also, head succeeds, so the plugin doesn't mind when the command closes its input early.

Maybe the problem is that the plugin is waiting for the command to close its input? And instead it should wait for the process to exit.

dpercy avatar May 30 '23 21:05 dpercy