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

Windows terminal session names don't change when launching a shell from the initial shell #30152

Closed
Tyriar opened this issue Jul 5, 2017 · 3 comments
Assignees
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities on-testplan terminal Integrated terminal issues windows VS Code on Windows issues
Milestone

Comments

@Tyriar
Copy link
Member

Tyriar commented Jul 5, 2017

Running cmd.exe inside powershell for example will always show powershell.exe as the terminal session name in the dropdown.

See #29879 (comment) for a possible solution utilizing wmic.exe.

Follow up: #30070

@Tyriar Tyriar added bug Issue identified by VS Code Team member as probable bug terminal Integrated terminal issues windows VS Code on Windows issues labels Jul 5, 2017
@Tyriar Tyriar added this to the Backlog milestone Jul 5, 2017
@Tyriar Tyriar self-assigned this Jul 5, 2017
@Tyriar Tyriar added the help wanted Issues identified as good community contribution opportunities label Jul 5, 2017
@Tyriar
Copy link
Member Author

Tyriar commented Jul 7, 2017

The eventual solution here will probably involve a combination of caching, polling and throttling calls to wmic, utilizing knowledge we can pull from the terminal like whether any output has happened (ie. there's no point checking if nothing has changed). Even though they're short-lived processes, we need to be very careful about not doing this too much.

@Tyriar
Copy link
Member Author

Tyriar commented Jul 12, 2017

I think for the case of executables we should trim the .exe. We don't gain much by saying "powershell.exe" over "powershell".

@Tyriar
Copy link
Member Author

Tyriar commented Jul 20, 2017

@Lixire I guess the next steps on this one are to make another call to wmic ~100ms after onData fires, but reset the timer if onData is fired again. We're after this behavior:

when onData fires
  if the timer is an active timer
    reset it to 100ms
  else
    create a timer for 100ms, when it goes off get the shell name as we are on enter

After this is done we will cover all major cases I believe. We'll be checking on enter, just after a program is launched, and also when output stops streaming in, for example when a process ends and the regular prompt is displayed.

Tyriar added a commit that referenced this issue Jul 25, 2017
Bring in lineFeed event for #30152, #31155
@Lixire Lixire modified the milestones: July 2017, Backlog Jul 31, 2017
@Lixire Lixire added feature-request Request for new features or functionality and removed bug Issue identified by VS Code Team member as probable bug labels Jul 31, 2017
@Tyriar Tyriar closed this as completed Aug 1, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities on-testplan terminal Integrated terminal issues windows VS Code on Windows issues
Projects
None yet
Development

No branches or pull requests

2 participants