跳到主要內容

aliases in Window command

大家好,我是奶綠茶
身為前端,每天最常打的指令就是
npm run start
npm run build
npm run 什麼的
在 Mac 可以方便的將指令設定別名縮寫
那 PC 上呢 ?
可以用 doskey ns=npm run start
但每次啟動 cmd 都要重新設定
可以透過以下方法整合到 vsCode
設定你的 ailases
奶綠我將檔案放在 E:\aliases.cmd

@echo off
doskey n=npm run $*
doskey ns=npm run start
doskey nb=npm run build
doskey s=npm run start
doskey b=npm run build

開啟 vsCode Settings.json, 加入以下設定

 "terminal.integrated.shellArgs.windows": [
    "/k",
    "e:\\aliases.cmd"
  ]
好了,這樣每次開啟 terminal 就可以有縮寫功能
轉載請註明出處

留言

ark patch notes寫道…
No No No No! You're taking away from me the only thing that makes me feel like a real Hax0r
(Which is typing super fast on a keyboard)
Jay I have gone through all you videos and I find them incredibly amazing. Your choice of words and professionalism used in explaining the terms and level of teaching are next to non. Please would you be creating more videos in intermediate and advance linux. I am currently studying to be a Linux Administrator. Please can you give me more tips on what hiring managers are looking for, jobs websites and any more advice? my email address is ckingsley.eze at gmail .com. Thanks so much for these vids.....
Read more


xcom 2 cheats寫道…
Not sure if it will work for you, but if I open a command prompt window and then hold down the and keys then hit the plus <+> or minus <-> keys the command prompt window becomes opaque (<+> key) or transparent (<-> key) against the background windows.

bro my last cmd will not work / plz telll me whats happend? thnks
C:\Windows\system32>nestat -an
'nestat' is not recognized as an internal or external command,
operable program or batch file.
By using the DOSKEY command I show you how to setup an alias on the windows command line (cmd.exe), and how to store your aliases so they are always accessible, without touching the windows registry.