microsoft / microsoft/terminal

wt.exe from command line with named console binary picks the wrong tab icon and wrong tab title

Open
#7,552 11 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Area-Commandline Area-UserInterface Issue-Bug Issue-Task Product-Terminal
Dominant language
C++
Stars
105k
Forks
9.6k
Avg merge
3d 17h
Merged PRs (30d)
29

Description

Environment

Windows build number: Microsoft Windows [Version 10.0.19041.450]
Windows Terminal version (if applicable): 1.2.2381.0

Steps to reproduce

start Windows terminal from console or Run... with a chosen named .exe that produces console output.

eg. win+R wt thiscommandisjustanexample enter

(picking a binary that actually does exist is not making a difference for this bug)

Expected behavior

  • Tab gets it's title from the binary's name

  • Tab gets it's icon from the called binary / tab gets a generic console-binary icon, since the binary does not contain one

Actual behavior

The tab inherits several pieces of behaviour from the default profile.

This includes,

  • the icon that is defined for defaultProfile in settings.json
  • the tabTitle that is defined for defaultProfile in settings.json
  • the default profile's backgroundImage with it's settings for backgroundImageStretchMode and backgroundImageAlignment applied as defined in settings.json

Reflection

You are just applying the default profile to anything unknown that runs, don't you?

Awesome. In that case, I guess, Windows Terminal requires a hidden default profile that is invoked if nothing else applies. Instead of just picking the one that is opened as default on start.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with wt.exe and a named console binary, using the Windows Terminal version and command shown in the report. Inspect how the invoked binary is matched against profiles and how settings.json supplies the default profile's icon, tabTitle, and background settings. Done means the launched tab uses the binary name and appropriate icon instead of inheriting those values from defaultProfile.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli, desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.