[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Weird behavior with Tcsh



Hello Ossama Othman <othman@astrosun.tn.cornell.edu>,

> I came across some strange behavior with my tcsh and xterm on slink.  Here
...
> xterm-2: mv test/me ~
>
> xterm-1: pwd   --->  /export/home/myhomedir/me
...
> The prompt in my "xterm-1" still shows "~/test/me."  When I do an "ls" in
> xterm-1 I get no error. 

That's probably because the prompt in tcsh is updated by the sequence of cd
commands, whereas the current directory is updated by what's on the disk.

You get the same kind of thing if you have softlinks to directories - the
prompt shows how you got there, while pwd shows you where you are.

If you have problems with this (eg you have symlinks in a circle and the
prompt just keeps growing longer), do 
# cd `pwd`
every now and then (make a short alias for it). You could make tcsh do it
after every command, depending on how fast your computer is.


HTH

Jiri <jiri@baum.com.au>


Reply to: