获取zsh提示以分别显示当前工作目录的尾部

时间:2018-11-28 02:29:14

标签: shell terminal zsh prompt zshrc

所以我当前的提示如下:
~/path/to/dir %

如果可能的话,我想要这样:
~/path/to (dir) %

我已经接近了!在我的.zshrc中,我目前有: PROMPT="%~ (%1d) %#"输出: ~/path/to/dir (dir) %

我只需要从第一个路径中删除最后一个文件夹“ dir”。有人有什么想法吗?

0 个答案:

没有答案