Windows的PowerShell新增which命令
发现在PowerShell找命令的路径时,发现没有which命令,只能使用Get-Command或where.exe来查找命令的路径,喜欢Linux命令的简捷性,想在PowerShell中也能直接使用which命令。
打开PowerShell配置文件
1 | |
在打开的记事本中添加以下内容并保存:
1 | |
重新打开 PowerShell 后,which 命令就可以直接使用了。
测试查询Python路径
1 | |
结果
1 | |
拓展查询其他命令路径
用于查询目录下的所有文件和子目录
1 | |
Windows的PowerShell新增which命令
http://pygo2.top/articles/10392/