-
Notifications
You must be signed in to change notification settings - Fork 27.9k
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
Add selected text to configuration variable #27466 #39483
Conversation
Thanks for the pr, however this week we are wrapping up our milestone which means I will review this PR start of next week. @dbaeumer fyi |
Looking at the original issue I am not so convinced this is needed in our core. What is the big use case scenario that could profit from this PR? |
@yitongding I agree with @isidorn. Can you please outline in which cases a selected text is needed for tasks ? |
@dbaeumer @isidorn Hi, thanks for reviewing! Here is my use case for selected text: As a frontend developer, I use a e2e test framework called nightwatch. When running the test, there is an option to choose which test case in the current test file I would like to run. So the command will be like Currently, I use Hopefully, I made my self clear 😄 |
@yitongding thanks for the example. This makes sense to me. |
@dbaeumer, actually, I see almost the the same case with running Karma tests in our project, that's why I voted for this issue. |
@isidorn any comments on the code. It looks good to me. |
@dbaeumer I will review a bit lataer today and if it looks good I will merge it in. Thanks |
@yitongding I just reviewed the code and it looks good to me. Thanks a lot |
@isidorn Thanks for reviewing! |
@yitongding @isidorn I'm having trouble getting this to work on 1.20 Insiders. Here's my tasks.json: {
"version": "2.0.0",
"tasks": [
{
"label": "echo",
"type": "shell",
"command": "echo",
"args": [
"${selectedText}"
]
}
]
} I just see "Executing task: echo ${selectedText}". If I use "${file}" or "${lineNumber}" it works fine. |
@gregvanl we have frozen insiders during the holidays - so no new updates are coming. So once we update the insiders start of january this should work just fine :) |
It seems that ${selectedText} variable is not added yet. Anyone know in which release this will be added ? I need this for one of the task :( |
Sorry this feature is already added in latest release but documentation is missing . |
@nileshkhaire we accept PRs that fix this. Here's our repo https://github.com/microsoft/vscode-docs |
Request:
Thanks. |
Add ${selectedText} configuration variable to tasks.json and launch.json, proposed in issue #27466