I have a particular need for adjusting the command prompt. At the moment i am using Holmans Dotfiles and I want to further customize it in order to create a prompt that's more readable and clear. What I would like is described below using image, plz note that these are photoshopped in order to look as i want them to ;). This is also an issue on github, with inline images!
Let's say you have this file structure as in this image:
At the moment, when I am in lets say map3 my prompt only shows:
I want to extend this but with alternative styling. At the moment the current map (map3) i am in is highlighted with cyan. I want to be able to see it's parents but those not being highlighted in the same color. Plz look at the image below:
from what i know, is that %3 gives the last 3 dir. However I don't know how to style each dir individually.
--------------------------- the other optional idea ----------------------------------------
The other idea I had, but which is of inferior importance to the problem described above is to have a relative prompt based on if a dir is a git repository yes or no. (so the dirtree is always visible up to the rootmap of the git repo)
that is say that map0 is the root of the git repository and i am in map3, then I would like my prompt to be like this:
when i am in map5 like this:
optionally it would be nice to be able to style the rootgit map like this for example:
at the moment my prompt is the same as in holmans dotfiles
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…