[英]How to hide home folder name from integrated VSCode's Terminal?
How to hide home folder name from integrated VSCode's Terminal? 如何在集成的VSCode终端中隐藏主文件夹名称?
Standard: 标准:
Andreys-MacBook-Pro:~ andreymarchenko$
I want to achieve: 我要实现:
~ $
The VSCode app uses the default system terminal and your installed shell. VSCode应用程序使用默认的系统终端和您安装的外壳。 In your case, it looks like a Mac so it is likely to be Terminal.app and bash(default).
在您的情况下,它看起来像是Mac,因此很可能是Terminal.app和bash(默认)。
You need to edit your ./.bash_profile
or ./.bashrc
Or /etc/bashrc
and change the settings for PS1
to 您需要编辑
./.bash_profile
或./.bashrc
或/etc/bashrc
并将PS1
的设置更改为
PS1='\W\$'
and restart vscode. 并重新启动vscode。 However, this will change your default prompt either for your user or system level based on which file is changed.
但是,这将根据更改的文件来更改用户或系统级别的默认提示。
Check https://apple.stackexchange.com/questions/224149/show-username-on-mac-terminal-prompt 检查https://apple.stackexchange.com/questions/224149/show-username-on-mac-terminal-prompt
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.