为什么 vscode 中的 powershell 终端显示路径

问题描述

我在 vscode 中使用终端时遇到问题。实际上我使用终端已经 1 年了,今天当我想使用终端时,它显示了这些:

PowerShell 7.1.3 版权所有 (c) 微软公司。 https://aka.ms/powershell 输入“帮助”以获取帮助。 PS C:\Programming\python\IT_python\python_senior_review_1>PS C:\Programming\python\IT_python\python_senior_review_1> cd c:/Programming/python/IT_python/python_senior_reviewPS C:\Programming\python\IT_python\python_senior_review_1> cd c:/Programming/python/IT_python/python_senior_review_1>编程/python/IT_python/python_senior_review_1/listsPS C:\Programming\python\IT_python\python_senior_review_1\lists>

而且我每次都必须调整终端窗口的大小以显示我的代码。 有人知道如何删除这些吗? (我也导入了终端图像。)

enter image description here

enter image description here

解决方法

如果您还没有尝试过更新 VSCode 和 Powershell,那将是一个不错的起点。

您也可以尝试设置您的 VSCode Powershell 配置文件,这可能会强制它解决该线宽问题:https://superuser.com/questions/446827/configure-windows-powershell-to-display-only-the-current-folder-name-in-the-shel

您也可以尝试更改屏幕分辨率设置,看看是否会影响它。

希望其中至少一项有所帮助。我也无法通过 Google 搜索找到太多内容。

编辑:显然这是当前版本的 VSCode (https://github.com/microsoft/vscode/issues/128342) 的问题

,

实际上这个问题是针对新版本的vscode(1.58)。我卸载了1.58,然后安装了1.57版本,这个问题解决了。