现在运行起来,看上去是正常的,但是按↑键往上翻会翻到我的命令里面-Command 传递的参数
可是我明明已经执行过
[Microsoft.PowerShell.PSConsoleReadLine]::ClearHistory()清除历史的命令了。
在 powershell.exe 里面直接运行没问题,但是放到注册表里就不行了。
麻烦大家帮我看看哪里错了。
wt new-tab powershell.exe -NoExit -Command Set-Location -literalPath '%V'|Set-PSReadLineOption -HistorySaveStyle SaveNothing|& {[Microsoft.PowerShell.PSConsoleReadLine]::ClearHistory()}
虽然会出现一条记录,并不影响使用,但是不完美呀。