ksh prompt
The Grand Master
asg at sage.cc.purdue.edu
Wed Mar 6 12:11:16 AEST 1991
In article <57993 at mcdchg.chg.mcd.mot.com> heiby at mcdchg.chg.mcd.mot.com (Ron Heiby) writes:
}lvc at cbnews.att.com (lawrence.v.cipriani) writes:
}>I suggest the cd in function ch be quoted:
}
}> function ch {
}> if "cd" ${*:-''}
}...
}>so that a second ". $ENV" will not see 'ch' inside of function ch.
WHY DO YOU WANT TO MAKE IT SO HARD?????
The $PWD variable changes when you cd.
ksh provides for another eval of the prompt string before printing it,
so all you have to do is quote the $ in $PWD like this:
PS1="\$PWD ->"
this will give you a prompt that includes the current directory and
is dynamic - and it is alot easier than a whole bunch of
kludged functions.
Bruce
---------
sar.casm \'sa:r-.kaz-*m\ \sa:r-'kas-tik\ \-ti-k(*-)le-\ n [F sarcasme, fr.
LL sarcasmos, fr. Gk sarkasmos, fr. sarkazein to tear flesh, bite the lips
in rage, sneer, fr. sark-, sarx flesh; akin to Av thwar*s to cut] 1: a
cutting, hostile, or contemptuous remark : GIBE 2: the use of caustic or
ironic language - sar.cas.tic aj
### ##
Courtesy of Bruce Varney ### #
aka -> The Grand Master #
asg at sage.cc.purdue.edu ### ##### #
PUCC ### #
;-) # #
;'> # ##
More information about the Comp.unix.shell
mailing list