powershell-4.0 - 如何从 powershell 提示符中删除“username@host”?
问题描述
我1.PowerShell, 2.WSL
在我的 Windows 10 机器中使用带有 shell 的 Windows 终端(预览版)。我安装了最新版本的oh-my-posh
并posh-git
自定义终端。我当前的主题是Agnoster
提供丰富多彩的自定义提示。但我想从提示中删除“username@host”。
例如:
当前=>用户名@主机D:\文件夹名称>
需要=> D:\文件夹名>
我尝试了一些$GitPromptSettings
变量以及 GitPrompt.ps1
posh-git 文件夹内的文件但没有用的东西。
另外,因为我有 oh-my-posh 和 posh-git,它们是否都具有提示自定义属性或者它只是来自 posh-git?
任何帮助表示赞赏。
解决方案
从中删除类型为会话的段~\Documents\WindowsPowerShell\Modules\oh-my-posh\3.101.23\themes\<themename>.omp.json
推荐阅读
- react-native - React Native Redux - 从预填充数据中分配状态属性
- cordova - Visual Studio 2017 Cordova App 项目系统遇到错误
- sql - SQL:将插入更改为查询以适应不同列的输入表
- java - Spring Boot 条件调度
- codenameone - 表单加载后如何刷新表单
- rest - Scala:验证控制器中的 Restful 参数
- ruby-on-rails - 如何测试应用程序是否容易受到 sprockets 漏洞的影响?
- r - 安装本地包时更新依赖项
- javascript - 如何以编程方式调用设置 *ngFor 源并呈现相应 html 的方法
- css - 将颜色更改为博主标题的一个元素