Icon and background image fields should reference parent process directory (if checked) -- Wildcards disabled #17252

Closed
opened 2026-01-31 05:36:45 +00:00 by claunia · 1 comment
Owner

Originally created by @0xJonasDev on GitHub (Apr 16, 2022).

Windows Terminal version

1.12.10732.0

Windows build number

19043.1645

Other Software

No response

Steps to reproduce

Forgive me if this has been addressed already somewhere else, but I realized that when Use parent process directory is checked, Command line is able to run testrun.bat which is located in the parent process directory but Icon is unable to access test_icon.ico which is also located in the parent process directory. Is there a reference (such as %USERPROFILE% is to the home folder) to point to the parent process directory so that I can access the test_icon.ico file? Something along the lines of %CD%\test_icon.ico(%CD% is a windows environment variable which outputs current directory path. See source but terminal does not recognize %CD%. Any idea how to deal with this situation? The intent here is to have wt dynamically locate whatever test_icon.ico file that is present in the current parent process directory for the icon or background image settings.

image

Expected Behavior

test_icon.ico in the Icon field, Loads the .ico file as the icon. Same goes for the background image in the Appearance tab.

Actual Behavior

I get the following error message below...

image

Originally created by @0xJonasDev on GitHub (Apr 16, 2022). ### Windows Terminal version 1.12.10732.0 ### Windows build number 19043.1645 ### Other Software _No response_ ### Steps to reproduce Forgive me if this has been addressed already somewhere else, but I realized that when ```Use parent process directory``` is checked, ```Command line``` is able to run ```testrun.bat``` which is located in the parent process directory but ```Icon``` is unable to access ```test_icon.ico``` which is also located in the parent process directory. Is there a reference (such as ```%USERPROFILE%``` is to the home folder) to point to the parent process directory so that I can access the ```test_icon.ico``` file? Something along the lines of ```%CD%\test_icon.ico```(%CD% is a windows environment variable which outputs current directory path. See [source](https://pureinfotech.com/list-environment-variables-windows-10/) but terminal does not recognize %CD%. Any idea how to deal with this situation? The intent here is to have wt dynamically locate whatever ```test_icon.ico``` file that is present in the current parent process directory for the icon or background image settings. ![image](https://user-images.githubusercontent.com/72827311/163658623-9fb420d2-9988-455b-88cb-3e3e0c0c12f8.png) ### Expected Behavior ```test_icon.ico``` in the ```Icon``` field, Loads the .ico file as the icon. Same goes for the ```background image``` in the ```Appearance``` tab. ### Actual Behavior I get the following error message below... ![image](https://user-images.githubusercontent.com/72827311/163658758-7804005a-a519-4c36-a74a-9d7ca544b11e.png)
claunia added the Needs-TriageIssue-BugNeeds-Tag-Fix labels 2026-01-31 05:36:46 +00:00
Author
Owner

@0xJonasDev commented on GitHub (Apr 23, 2022):

Found a solution in this article

In the Icon and Background fields, you can reference your files relative to your current working directory:

%__CD__%\relative_path_to_icon_file. In my case it would be %__CD__%\graphics\app_bckgnd.jpg.

@0xJonasDev commented on GitHub (Apr 23, 2022): Found a solution in this [article][1] In the ```Icon``` and ```Background``` fields, you can reference your files relative to your current working directory: ```%__CD__%\relative_path_to_icon_file```. In my case it would be ```%__CD__%\graphics\app_bckgnd.jpg```. [1]: https://weblog.west-wind.com/posts/2019/Sep/03/Programmatically-Opening-Windows-Terminal-in-a-Specific-Folder
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#17252