Skip to content

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

Closed

Description

@Tyriar

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

Activity

  1. added
    bug
    terminal
    windows
    on Jul 5, 2017
  2. added this to the Backlog milestone on Jul 5, 2017
  3. added
    help wanted
    on Jul 5, 2017
  4. Tyriar commented on Jul 7, 2017

    @Tyriar
    ContributorAuthor

    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.

  5. Tyriar commented on Jul 12, 2017

    @Tyriar
    ContributorAuthor

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

  6. Tyriar commented on Jul 20, 2017

    @Tyriar
    ContributorAuthor

    Amy Qiu (@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.

  7. added a commit that references this issue on Jul 25, 2017
  8. added
    feature-request
    and removed
    bug
    on Jul 31, 2017
  9. locked and limited conversation to collaborators on Nov 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

feature-requesthelp wantedon-testplanterminalwindows

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions