Customize CSH prompt for Git repo
问题 I want to have a custom CSH prompt when I am inside a Git repo. I want the prompt to look like this if I am not in a git repo host_name>$ But when I am inside a Git repo must turn into something like this host_name [GIT REPO ROOT DIR]>$ I just want to display the root of the Git repo (GIT REPO ROOT DIR), so that I know in which repo I am currently in. Instead of using 'pwd' everytime. Do you guys have any suggesstions on achieveing this? Thanks for the help -Anish 回答1: Here's how I did it for