加入收藏 | 设为首页 | 会员中心 | 我要投稿 财气旺网 - 财气网 (https://www.caiqiwang.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 服务器 > 搭建环境 > Linux > 正文

vscode shellArgs

发布时间:2022-12-20 11:19:16 所属栏目:Linux 来源:
导读:  网上的大部分是这个答案:

  "terminal.integrated.shellArgs.windows": ["-NoExit", "/c", "chcp 65001"]

  如果你觉得不行,请用这个

  "terminal.integrated.shellArgs.windows": ["chcp 650
  网上的大部分是这个答案:
 
  "terminal.integrated.shellArgs.windows": ["-NoExit", "/c", "chcp 65001"]
 
  如果你觉得不行,请用这个
 
  "terminal.integrated.shellArgs.windows": ["chcp 65001", ";", "powershell", "-NoLogo"]
 
  下面解释原因
 
  而且里面需要用到 "type": "shell" ,那么他们是不兼容的,会显示这个 参数格式不正确 - -Command ,我当时的感觉是 搞死人了。
 
  先解释下这个报错,你加了上面那个 shellArgs后会自动带上一个 -Command -
 
  然后执行 tasks当 "type": "shell"时又会自动带上 -Command
 
  最终的命令变成了 powershell chcp 65001 -Command – -Command “你的命令”
 
  所以提示 参数格式不正确 - -Command
 
  附:看 powershell可用参数 powershell -?
 
  补充一个简化版:
 
  “terminal.integrated.shellArgs.windows”: [“chcp 65001; powershell -NoLogo”]
 
  VSCode的设置更新了,我跟进一版最新的
 
  “terminal.integrated.profiles.windows”: {
 
  “powershell”: {
 
  “source”: “PowerShell”,
 
  “args”: [“chcp 65001; powershell -NoLogo”]
 
  }
 
  },
 
  “terminal.integrated.defaultProfile.windows”: “powershell”linux编码,
 
  Original:
 
  Author: Recco_Do
 
  Title: vscode shellArgs.windows参数如何设置使得powershell终端字符集编码为UTF-8?
 

(编辑:财气旺网 - 财气网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!