66

windows - How to define a DOSKEY alias for multiple commands? - Stack Overflow

 6 years ago
source link: https://stackoverflow.com/questions/47507185/how-to-define-a-doskey-alias-for-multiple-commands
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

How to define a DOSKEY alias for multiple commands?

Following on from an answer to this question

For the Windows command prompt I can define aliases as follows:

@echo off
DOSKEY ns=npm start
DOSKEY nsr=npm run serve

I want to define an alias that will combine these two commands. I tried the following:

@echo off
DOSKEY nss=npm start && npm run serve

When I try to open the command prompt the window will open but the > prompt does not appear.

I think that the inclusion of && is causing a problem.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK