Skip to content

Support incoming args for changeIcon & changeColor terminal commands #239973

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AdrieanKhisbe
Copy link
Contributor

@AdrieanKhisbe AdrieanKhisbe commented Feb 7, 2025

This Pull request permit the passing of args to the changeIcon/changeColor terminal commands.

This way, it’s possible to control icon and color of the terminal tab, from the terminal itself using remote-control extension.

Currently, trying to do so would trigger the prompt to pop up even with a specified arg, as the args are not forwarded.

I tested locally this PR code by adding the remote control extension to the extensions , and by running the provided command from a fresh terminal. (websocat was installed from brew on a macbook)

I might need some guidance if automated test are to be added, or existing one adapted.

Preview

echo "{ \"command\": \"workbench.action.terminal.changeIcon\", \"args\": \"lightbulb\" }\n{ \"command\": \"workbench.action.terminal.changeColor\", \"args\": [\"terminal.ansiYellow\", false] }" \
    | websocat ws://localhost:$REMOTE_CONTROL_PORT
before after
Capture d’écran 2025-02-04 à 18 03 28 Capture d’écran 2025-02-04 à 18 03 38

@AdrieanKhisbe AdrieanKhisbe force-pushed the support-args-in-terminal-change-color-icon branch from b559f04 to c9444e0 Compare April 3, 2025 12:28
@AdrieanKhisbe
Copy link
Contributor Author

Feel free to contact me @joyceerhl if ever you need some help for guidance, or if ever intent of PR needs clarifications.
I just updated base, and improved a bit the original PR description.

:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants