1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Console window titles / tab caption

Discussion in 'Support' started by Rod Savard, Feb 12, 2014.

  1. Rod Savard

    Joined:
    May 26, 2008
    Messages:
    481
    Likes Received:
    3
    If I use the TITLE command in TCC or CMD, the corresponding tab is updated in TCMD as expected.

    But for PowerShell the tab is NOT being updated. This is the PowerShell command I used to change the console window title text:

    Code:
    $Host.UI.RawUI.WindowTitle = "Some Text"
    If I detach the tab I can see that the above command is working similarly to the TITLE command in TCC/CMD. When I reattach the tab, TCMD shows the correct title at the time of being attached.

    It seems TCMD is not detecting the title change while attached for some reason.
     
  2. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,520
    Likes Received:
    4
    Powershell is not integrated with TCC. Just because a Powershell command operates similarly to (or even identically to) a TCC command, it is still not a TCC command. Don't yet expect the DWIM parser!
     
  3. Rod Savard

    Joined:
    May 26, 2008
    Messages:
    481
    Likes Received:
    3
    Huh? I'm not sure what you mean. TCMD supports attaching console apps. That's what I do with TCMD -- I use TCC, CMD, and PowerShell within the TCMD window. I am not attempting to integrate PS with TCC.

    I am just reporting that when PS changes the title text of its console window, it is not reflected in the corresponding tab in TCMD (unlike TCC or CMD).
     
  4. Ugo

    Ugo

    Joined:
    Aug 22, 2013
    Messages:
    10
    Likes Received:
    0
    It works for me.
    I am running the latest version of TCMD 16, 32 bit on Windows 7 - 32 bit.

    If I replace the title of a tab using the context menu -> "rename tab", then the value of the powershell variable
    $Host.UI.RawUI.WindowTitle is ignored, no matter if I change it.

    But i can detach the tab, and the title changes to reflect the value of the PS variable.
    If I reattach the console to TCMD everything works as expected: the title of the tab matches the PS variable $....WindowTitle and changes whenever I update the variable.
     
  5. Rod Savard

    Joined:
    May 26, 2008
    Messages:
    481
    Likes Received:
    3
    Thanks! You solved the mystery! I use custom toolbar buttons in TCMD to launch PS or CMD sessions. The toolbar button was configured to set a tab caption (in the case of PS, just "PowerShell"). This seems to override whatever the console app itself tries to set.
     

Share This Page