以前经常在WindowsPowershell中打exit会出现返回错误的输出,最烦的是这个会中断你关闭当前的窗口,必须手动点击右上角的叉。
这个问题可以通过在settings.json中添加 "closeOnExit": "always" 来解决,网上也有说,但是很多都没有说清楚要加到哪里,以下是一个配置参考。
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"defaultProfile": "{2c4de342-38b7-51cf-b940-2309a097f518}",
"initialPosition": "center",
"initialCols": 160,
"initialRows": 40,
"copyOnSelect": true,
"profiles":{
"defaults": {
"closeOnExit": "always"
},
"list": [
{
"guid": "{2c4de342-38b7-51cf-b940-2309a097f518}",
"hidden&#