我希望有一个可读的彩色路径。例如,不是简单地使用 %~ 返回,~/path/to/foo我想将其格式化~$RED/$NOCOLORpath$RED/$NOCOLORto$RED/$NOCOLORfoo为突出显示路径分隔符。
我可以定义 PROMPT 的内容,以便在每个显示器上重新评估路径表达式吗?类似的东西${${(%):-%~}//\//_some_format_expression/}显然不起作用。
或者我应该进一步破解它,并在每次我们更改目录时强制重置 PROMPT 值?
欢迎任何实现路径格式化目标的解决方案。
谢谢 :)
背景:我曾经在全新安装时一切正常:
$ svn co https://domain:443/ test1
Error validating server certificate for 'https://domain:443':
- The certificate is not issued by a trusted authority. Use the
fingerprint to validate the certificate manually!
Certificate information:
- Hostname: **REMOVED**
- Valid: **REMOVED**
- Issuer: **REMOVED**
- Fingerprint: **checked with issuer and REMOVED**
(R)eject, accept (t)emporarily or accept (p)ermanently? p
Authentication realm: <https://domain:443> Subversion repository
Password for 'nicdumz-machine-hostname':
Authentication realm: <https://domain:443> Subversion repository
Username: nicdumz
Password for 'nicdumz':
# proceeds to checkout correctly
$ svn …Run Code Online (Sandbox Code Playgroud)