我在 Windows 上使用 cmder:http ://bliker.github.io/cmder/
我已经从 nodejs.org 安装了 node.js。
我可以通过运行以下命令在 cmder 中运行 npm:
C:\Program Files\nodejs\npm.cmd
现在我如何为此创建一个别名,以便我可以运行,例如npm install -g bower?
我试过这个:
alias npm="C:\Program Files\nodejs\npm.cmd"
但它报告回来:
alias npm="C:\Program Files\nodejs\npm.cmd"
Files\nodejs\npm.cmd""] was unexpected at this time.
如果文件名包含空格,则必须使用 8.3 版本的名称,如下所示:
alias npm=C:\Progra~1\nodejs\npm.cmd $*
您可以使用以下命令获取短名称:dir /x c:\。
来源:https : //bountify.co/creating-an-alias-for-npm-using-cmder-in-windows
| 归档时间: |
|
| 查看次数: |
10584 次 |
| 最近记录: |