外观
powershell修改提示中文件路径
2022-05-18
参考hiding-the-full-file-path-in-a-powershell-command-prompt-in-vscode
test-path $profile
(is there a profile set up?)new-item -path $profile -itemtype file -force
(assuming the answer to the above is false)notepad $profile
(opens notepad)- paste in (from the SuperUser answer above)
function prompt {
$p = Split-Path -leaf -path (Get-Location)
"$p> "
}
- save (you shouldn't have to chose a location, it is already done for you)
这里其实直接新开一个 powershell 窗口就可以了
- reload vscode - you will probably get an error message about running scripts (or just do next step before reload)
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
(at your integrated terminal PS prompt, also from the SuperUser answer)- reload vscode