prompt...

Started by Metgod, April 07, 2002, 06:52:37 PM

Previous topic - Next topic
okay...

I was helping someone out on IRC about some basic BSD stuff...

I showed him how to make TAR files, how to change the system time, but
come the time to change the prompt I had some trouble...

What he wanted it to look like was:

sysname /current/dir #

I got it to work except it wouldn't change directory names everytime you change
a directory (for the obvious reason that `pwd` shows the current dir AT THAT POINT)

What I did was:

set prompt="`hostname -s` `pwd` #"

He couldn't even get it to work, getting:
Unmatched `.

csh btw..

I got exactly what I expected except for the changing of directory everytime I cd..
Any ideas ?

thanks...

"My Terminal is my Soul"

Yeah, here's the info:

For csh add this to .cshrc file:

alias setprompt 'set prompt="hostname -s' ${cwd}# "'
setprompt
alias cd 'chdir \!* && setprompt'

That should do it.

Wilnix
alt email address: wilnix@hackphreak.org

SMF spam blocked by CleanTalk