From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21591 invoked from network); 14 Jan 2002 13:28:06 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 14 Jan 2002 13:28:06 -0000 Received: (qmail 7701 invoked by alias); 14 Jan 2002 13:27:40 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 4588 Received: (qmail 7689 invoked from network); 14 Jan 2002 13:27:39 -0000 To: d.vogt@lifebits.de cc: zsh-users@sunsite.auc.dk Subject: Re: problem with named directories over the net References: <20020111134158.F852@lifebits.de> Reply-To: sinclair@dis.strath.ac.uk Date: Mon, 14 Jan 2002 13:27:29 +0000 Message-ID: <27644.1011014849@dis.strath.ac.uk> From: Duncan Sinclair Hi, Dominik writes: >I like to shorten my prompt by using '~' instead of the full path >to my home directory. For example: > / $ cd ~/bin > ~/bin $ >Now the problem occurs when I fire up mc. Upon leaving mc, a >script from the mc documentation cds into the current path and I >get something like > /net/server/share/home/luthien/bin $ >as the prompt because this is where my home directory comes from. >/home is a symbolic link to /net/server/share/home. Any idea how >I can prevent this? In my .zshenv I have this code.... # Going for hack of the year award... case "$PWD" in /tmp_mnt/*) cd '/tmp_mnt' '' ;; /export/*) cd '/export' '' ;; *) ;; esac It was put there to get around older Sun automounter difficulties... (It is no-longer necessary, but it does no harm...) If you want to be really pro-active, you could try something like this in your precmd function... precmd() { case "$PWD" in /net/server/share/*) cd '/net/server/share' '' ;; *) ;; esac } No idea if it works... Good luck! Duncan. PS> Solutions involving CHASE_LINKS are _evil_!!!