通过Powershell脚本更改vscode中的Integrated Terminal标题

问题描述

我正在使用VScode在不同的Powershell中运行具有相同参数的相同Powershell脚本。

有什么办法可以通过powershell脚本命名终端标题,以便区分在哪个终端中运行的参数?

我需要Powershell参数中的1:PowerShell2:PowerShell来代替alphabeta, 我已经检查了这个答案Change Integrated Terminal title in vscode,但需要人工干预。

enter image description here

enter image description here

解决方法

数字将保留,但是您可以通过首先打开命令选项板(Ctrl + Shift + P)然后搜索Terminal: Rename来更改标题。
然后,您可以输入任何想要的名称。