Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

problem with named directories over the net



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?

The function I start mc with looks like this:

------------------------ snip --------------------
# midnight commander (change dir after exit)
mc ()
{
  local MC
  MC=/tmp/mc$$-"$RANDOM"
  if [ "$TERM" = xterm -o "$TERM" = rxvt ] ; then
    /usr/bin/mc -a -c -d -u -x -P "$@" > "$MC"
  else
    /usr/bin/mc -a -c -d -u -P "$@" > "$MC"
  fi
  cd `cat "$MC"`
  rm "$MC"
  unset MC;
}
------------------------ snip --------------------

Bye

Dominik ^_^  ^_^

-- 
Dominik Vogt, email: d.vogt@xxxxxxxxxxx
LifeBits Aktiengesellschaft, Albrechtstr. 9, D-72072 Tuebingen
fon: ++49 (0) 7071/7965-0, fax: ++49 (0) 7071/7965-20



Messages sorted by: Reverse Date, Date, Thread, Author