将 node.js 目录添加到 cygwin 路径会破坏 ls 命令:
Starting /bin/bash.exe
myidt@DESKTOP-IV5C6TI /cygdrive/d/tmp/node_ls_ko
$ touch toto
user@DESKTOP /cygdrive/d/tmp/node_ls_ko
$ ls
toto
user@DESKTOP /cygdrive/d/tmp/node_ls_ko
$ PATH=/cygdrive/d/brl/app/node-v14.17.6-win-x64:%PATH%
user@DESKTOP /cygdrive/d/tmp/node_ls_ko
$ ls
bash: ls : commande introuvable
当然,节点目录不包含任何看起来像“ls”的东西:
在新的 cygwin 终端中如下所示:
$ ls /cygdrive/d/brl/app/node-v14.17.6-win-x64
asciidoctor-pdf asciidoctor-web-pdf.ps1 install_tools.bat node.exe npm
asciidoctor-pdf.cmd CHANGELOG.md jhipster node_etw_provider.man npm.cmd
asciidoctor-pdf.ps1 inliner jhipster.cmd node_modules npx
asciidoctor-web-pdf inliner.cmd jhipster.ps1 nodevars.bat npx.cmd
asciidoctor-web-pdf.cmd inliner.ps1 LICENSE nodevars_my.bat README.md