vscode终端不显示文件夹和分支 [英] Vscode terminal doesnt display folder and branch

查看:99
本文介绍了vscode终端不显示文件夹和分支的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下是我看到的终端:

由于某些原因,Vscode 默认不显示文件夹名称和 git 分支.我在另一个系统上安装了 vscode,没有进行自定义设置,它也会显示它们以及颜色.

Vscode for some reason does not display the folder name and git branch by default. I have vscode on another system with no custom settings made and it displays them plus the colours as well.

vscode 设置:

{
    "workbench.colorTheme": "Monokai Dimmed",
    "workbench.iconTheme": "material-icon-theme",
    "terminal.integrated.copyOnSelection": true,
    "terminal.integrated.cursorBlinking": true,
}

推荐答案

终端提示中的文件夹名称和分支来自 shell,而不是来自 VS Code.

The folder name and branch in the terminal prompt come from the shell, not from VS Code.

很可能您系统的一个 shell 设置了自定义提示,而另一个则没有.您在使用系统终端时也应该看到这一点.解决办法是把两个系统的提示配置成一样

It is likely that one of your system's shells has a custom prompt set while the other does not. You should also see this when using the system terminal. The solution is to configure the prompt on both systems to be the same

您也可以尝试配置VS Code使用的shell确保 VS Code 的集成终端使用正确的 shell 和正确的环境

You can also try configuring the shell that VS Code uses to ensure VS Code's integrated terminal uses the correct shell with the correct environment

这篇关于vscode终端不显示文件夹和分支的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆