Separately styling the base directory and current folder in prompt Path #2587
Answered
by
JanDeDobbeleer
KyleKing
asked this question in
Troubleshoot
|
I really liked how my {
"blocks": [
{
"foreground": "p:white",
"properties": {
"command": "((pwd | grep -q \"$HOME/\") && (dirname \"$PWD\" | sed -E \"s-^$HOME($|(/.*))-~\\2-\")) || true",
"shell": "sh"
},
"style": "plain",
"template": "{{ .Output }}/",
"type": "command"
},
{
"foreground": "p:blue",
"style": "plain",
"template": "{{ .Folder }} ",
"type": "text"
}
]
}Would love to see if there is an easier or more efficient way to go about it |
Answered by
JanDeDobbeleer
Jul 28, 2022
Replies: 1 comment 4 replies
|
Interesting, let's create a style for this. |
4 replies
Answer selected by
KyleKing
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment



Interesting, let's create a style for this.