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

Re: Named directories



Mika Seppänen wrote:

21.2.2005 kello 16:31, Peter Stephenson wrote:

You need to refer to "~work" at least once; the usual trick is to put

: ~work

in your .zshrc after defining the directory.  You can also "setopt
autonamedirs" to make all such parameters eligible for this
replacement.

His situation is that the directory he is talking about has two names, and if he refers to it as, say, ~a, the prompt shows ~b. I've seen the same thing, although I've never considered it difficult to work with, as long as (in his case) ~work gets you where you want to go.

For example, I have the following (and sorry if I'm misinterpreting the question):

export UTILDIR=/a/b/c
export ud=$UTILDIR

then ~UTILDIR takes me to the correct place (since I have the setopt's required to do this), but the prompt shows ~ud, not ~UTILDIR.

It would, from my perspective, be nice to say ~ud and have it displayed in the prompt as ~UTILDIR (less typing, more meaningful prompt).

If this is not an anaologous situation, would someone please tell me why, and how it relates to the original question?

TIA


I found that by reading manuals and using google, but It doesn't help.

I get following: (PS1=%s\> and option autonamedirs unset, though seting it doesn't change situation in anyway)

~>cd work
~/Projektit/rnd/ott/sip.imp
~/Projektit/rnd/ott/sip.imp>pwd
/Users/c8z/Projektit/rnd/ott/sip.imp
~/Projektit/rnd/ott/sip.imp>cd foo
~foo
~foo>pwd
/usr/local/etc
~foo>

(zsh 4.1.1 on Mac OS X)

Mika


!DSPAM:4219f941108266494394366!





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