[OS X TeX] path before prompt
Robert Bruner
rrb at math.wayne.edu
Sun Feb 17 12:25:21 EST 2008
Interesting: I use tcsh and get the full path starting from my home
directory, if it descends from there, or from root, if not, with no
special iinitialization comands.
To alter the prompt, add a line to your .tcshrc (i.e., create one if
you don't already have one) saying what you want the prompt to be.
You can play with this at the commmand line to get it right. Here are
some examples. First, I remove the prompt altogther, or more
precisely, set it to the empty string, in order to maximize confusion.
Then I set it to display the current directory and the 'history number
of the command'. Then I change it to use ~ in place of /Users/rrb for
my home directory.
/tmp[12]: set prompt=''
echo 'watch this'
watch this
echo 'Look Ma, no prompt!'
Look Ma, no prompt!
set prompt='%/[\!]: '
/tmp[16]: cd ~
/Users/rrb[17]: echo 'Look Ma, prompt is back'
Look Ma, prompt is back
/Users/rrb[18]: set prompt='%~[\!]: '
/tmp[20]: cd ~/Desktop/cohom
~/Desktop/cohom[21]:
My favorite comes from the man page for tcsh:
sched 5pm set prompt='[%h] It\'s after 5; go home: >'
which makes an appropriate change to your prompt at 5PM. For full
details see the man page for tcsh. The prompt variable is explained
in lines around 3300 out of a total of 4109 lines in my tcsh man page.
(execute 'man tcsh', then type 3270G to go directly to line 3270.
sh and other shell users will undoubtedly explain how their shell sets its
prompts, but they'll probably be similar.
Bob
More information about the MacOSX-TeX
mailing list