Passing doskey alias file to commandline not working #17623

Open
opened 2026-01-31 05:48:03 +00:00 by claunia · 0 comments
Owner

Originally created by @jathek on GitHub (Jun 4, 2022).

Windows Terminal version

1.13.10733.0

Windows build number

10.0.19044.1645

Other Software

No response

Steps to reproduce

Trying to use an alias.cmd file as mentioned in this issue.

Profile in settings.json:

            {
                "altGrAliasing": true,
                "antialiasingMode": "grayscale",
                "closeOnExit": "graceful",
                "commandline": "cmd.exe /K \"C:\\Users\\Jason\\alias.cmd\"",
                "elevate": false,
                "guid": "{7a1c5dd6-779d-4b81-9599-8cbe559fc419}",
                "hidden": false,
                "historySize": 9001,
                "icon": "ms-appx:///ProfileIcons/{0caa0dad-35be-5f56-a8ff-afceeeaa6101}.png",
                "name": "Command Prompt",
                "snapOnInput": true,
                "startingDirectory": "%USERPROFILE%"
            }

alias.cmd:

@echo off
doskey s=ssh $*

Expected Behavior

No response

Actual Behavior

Commands are not available when I open Terminal, but they become available after I manually run alias.cmd from the Terminal window.

Originally created by @jathek on GitHub (Jun 4, 2022). ### Windows Terminal version 1.13.10733.0 ### Windows build number 10.0.19044.1645 ### Other Software _No response_ ### Steps to reproduce Trying to use an alias.cmd file as mentioned in [this issue](https://github.com/microsoft/terminal/issues/4019#issuecomment-567427024). Profile in settings.json: ```json { "altGrAliasing": true, "antialiasingMode": "grayscale", "closeOnExit": "graceful", "commandline": "cmd.exe /K \"C:\\Users\\Jason\\alias.cmd\"", "elevate": false, "guid": "{7a1c5dd6-779d-4b81-9599-8cbe559fc419}", "hidden": false, "historySize": 9001, "icon": "ms-appx:///ProfileIcons/{0caa0dad-35be-5f56-a8ff-afceeeaa6101}.png", "name": "Command Prompt", "snapOnInput": true, "startingDirectory": "%USERPROFILE%" } ``` alias.cmd: ```batch @echo off doskey s=ssh $* ``` ### Expected Behavior _No response_ ### Actual Behavior Commands are not available when I open Terminal, but they become available after I manually run alias.cmd from the Terminal window.
claunia added the Needs-TriageIssue-BugNeeds-Tag-FixProduct-Terminal labels 2026-01-31 05:48:03 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#17623