最新消息:20210917 已从crifan.com换到crifan.org

【规避解决】VSCode集成的终端PowerShell中找不到各种工具和命令

VSCode crifan 1172浏览 0评论
折腾:
【已解决】Windows中类似rm -rf的删除命令
和之前其他事情期间,发现Windows中VSCode内置启动终端PowerShell里面,找不到很多其他工具和命令
比如:
(venv) PS D:\dev\DevRoot\mitmdumpurlsaver> rd /?
根本没有输出。
运行也会报错:
(venv) PS D:\dev\DevRoot\mitmdumpurlsaver> rd /h
rd : 找不到路径“D:\h”,因为该路径不存在。
所在位置 行:1 字符: 1
+ rd /h
+ ~~~~~
    + CategoryInfo          : ObjectNotFound: (D:\h:String) [Remove-Item], ItemNotFoundException
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.RemoveItemCommand
而对应的cmd却正常:
D:\dev\DevRoot\mitmdumpurlsaver\electron-python-example (master -> origin) (MitmdumpUrlSaver@1.0.0)
(venv) λ rd /?
删除一个目录。


RMDIR [/S] [/Q] [drive:]path
RD [/S] [/Q] [drive:]path


    /S      除目录本身外,还将删除指定目录下的所有子目录和
            文件。用于删除目录树。


    /Q      安静模式,带 /S 删除目录树时不要求确认
vscode powershell not working
VS Code powershell is not running any ionic command – Stack Overflow
Why i don’t use VS Code for Powershell : PowerShell
PowerShell editing with Visual Studio Code
之前安装的就是 Microsoft官网的PowerShell插件
但是感觉还是兼容性有问题
How to Configure Visual Studio Code to run PowerShell for Windows and PowerShell Core Simultaneously
算了,换VSCode的集成终端是cmd,看看效果如何
至少,此处输入rd /?
是可以输出rd的help信息的。
【总结】
以后还是就继续先用cmd作为VSCode的默认终端。

转载请注明:在路上 » 【规避解决】VSCode集成的终端PowerShell中找不到各种工具和命令

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
92 queries in 0.225 seconds, using 23.32MB memory