Re^2: Getting UNIX prompt to display current directory
Michael Morrell
morrell at hpsal2.HP.COM
Wed Mar 29 07:09:29 AEST 1989
/ hpsal2:comp.unix.questions / lbn at ksuvax1.cis.ksu.edu (Lars Bo Nielsen) / 7:52 am Mar 27, 1989 /
You are right. Here are the modified (quicker) versions:
2) Only name of current dir:
alias cd 'cd \!*; set foo=$cwd; set prompt=$foo:t"% "'
3) Include name of machine in prompt
alias cd 'cd \!*; set prompt=$host":"$cwd"% "'
or alias cd 'cd \!*; set foo=$cwd; set prompt=$host":"$foo:t"% "'
----------
I don't think you need the extra variable foo. "set prompt=$cwd:t" works
just fine.
Michael
More information about the Comp.unix.questions
mailing list