Korn Shell Question

jona at moss.ATT.COM jona at moss.ATT.COM
Fri Oct 31 23:20:30 AEST 1986


In ksh this is really a simple thing to do and you can extend in to be even
more useful by using this:

PS1="\${PWD#\$HOME/}> "

What this does is remove your home directory name from the beginning of
the prompt if you are anywhere below your home directory.
This is really useful because when you are in your own
directory structure your prompt isn't quite as long - and since my home
directory is 14 characters long (including /'s) it is nice. 

Example: my home directory is '/m/swdev/jona' so if I am in /m/swdev/jona/bin
my prompt will be 'bin> ' instead of 'm/swdev/jona/bin> '.



More information about the Comp.unix mailing list