Reputation: 144
This is in Git Bash
I am trying to make my prompt go from
/c/folder $
to
c->folder $
What would I put in my .bashrc
to make this work? Is it even possible?
Upvotes: 0
Views: 46
Reputation: 123460
You can do arbitrary things to your prompt by setting PROMPT_COMMAND
to a function that assigns PS1
:
PROMPT_COMMAND="setmyprompt"
setmyprompt() {
dir="${PWD#/}"
dir="${dir//\//->}"
PS1="$dir \\\$ "
}
Upvotes: 1