Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sendText sends command twice in new terminals during onDidChangeTerminalShellIntegration #208736

Closed
rzhao271 opened this issue Mar 25, 2024 · 1 comment
Assignees
Labels
*as-designed Described behavior is as designed

Comments

@rzhao271
Copy link
Contributor

Testing #208462

In my onDidChangeTerminalShellIntegration handler, I have the following line:
e.terminal.sendText('echo "Hello shell integration!"', true);

I notice that when I start my extension, a terminal is already open, and text is not sent to that terminal. Whenever I start another terminal, I notice that the command is placed into the terminal twice and is run each time.

If I change the true to false, I notice that text is still not sent to the already-open terminal, but that for new terminals, the text is pasted in twice as well, so I get echo "Hello shell integration!"echo "Hello shell integration!" in the new terminal.

@Tyriar
Copy link
Member

Tyriar commented Apr 11, 2024

This is actually by design, when the shell isn't ready to accept input it just echos the text. The first text is the echoed text, the second is the actual input

@Tyriar Tyriar closed this as completed Apr 11, 2024
@Tyriar Tyriar added the *as-designed Described behavior is as designed label Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
*as-designed Described behavior is as designed
Projects
None yet
Development

No branches or pull requests

2 participants