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

问题描述

当我在VS Code中打开集成终端时,初始屏幕显示"bash-3.2",查看我的屏幕截图

When I open integrated terminal in VS Code, the initial screen showing "bash-3.2",see my screen shot

当我查看任何在线示例时,它总是显示当前路径或文件夹,例如官方页面.

When I looked any online examples, it always showing current path or folder, such as the image in official page.

我想知道如何更改设置,以便集成终端可以至少显示我正在运行命令的当前文件夹.请指教.

I was wondering how could I change the setting so that integrated terminal can show at least current folder that I am running the command.Please advise.

===更新====

===updated====

推荐答案

找到了答案.您应该将以下内容添加到settings.json:

Found the answer. You should add the following to settings.json:

"terminal.integrated.shellArgs.osx": ["-l"]

重新启动VS Code即可看到效果.

Restart VS Code to see it take effects.

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

08-12 13:42