scootermaster
Platinum Member
So, I have some links on my unix install, and my .bashrc has something like this that I lifted from the Internet:
function fastprompt()
{
unset PROMPT_COMMAND
case $TERM in
*term | rxvt )
# PS1="${HILIT}[\h:$NC\w] \[\033]0;\${TERM} [\u@\h] \w\007\]" ;;
PS1='[\u $(pwd)] ';;
linux )
PS1="${HILIT}[\h:$NC \w] " ;;
*)
PS1="[\h:\w] " ;;
esac
}
The problem is, my prompt then gets things like [server: /home/Link To Directory/here] which isn't great when your whole Linux install is actually a VMWare machine, and what you're linking to is a Dropbox directory on your host directory. I also [mistakenly] had dropbox running on the VMware image, and I literally had to put "FINDME" files in various directories to figure out where the hell I was and to figure out what was dropbox syncing with what.
Anyway, that stupidity has been fixed, but I'd still like my prompt to show the real path. I have a solution for a "real" Linux box, but that's using .csh is a lot clunkier than
\w and I don't know how to port it to bash (it involves setting a variable every time you call "cd", and then displaying that in the prompt, I think or something).
Any ideas?
function fastprompt()
{
unset PROMPT_COMMAND
case $TERM in
*term | rxvt )
# PS1="${HILIT}[\h:$NC\w] \[\033]0;\${TERM} [\u@\h] \w\007\]" ;;
PS1='[\u $(pwd)] ';;
linux )
PS1="${HILIT}[\h:$NC \w] " ;;
*)
PS1="[\h:\w] " ;;
esac
}
The problem is, my prompt then gets things like [server: /home/Link To Directory/here] which isn't great when your whole Linux install is actually a VMWare machine, and what you're linking to is a Dropbox directory on your host directory. I also [mistakenly] had dropbox running on the VMware image, and I literally had to put "FINDME" files in various directories to figure out where the hell I was and to figure out what was dropbox syncing with what.
Anyway, that stupidity has been fixed, but I'd still like my prompt to show the real path. I have a solution for a "real" Linux box, but that's using .csh is a lot clunkier than
\w and I don't know how to port it to bash (it involves setting a variable every time you call "cd", and then displaying that in the prompt, I think or something).
Any ideas?