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

Re: named directory bug



On Oct 31,  8:21pm, Vincent Lefevre wrote:
} Subject: Re: named directory bug
}
} On Wed, Oct 31, 2001 at 15:31:24 +0000, Bart Schaefer wrote:
} > Here's a possible fix.  At the least it's a workaround that you can apply in
} > the meantime.
} 
} It fixes the problem, but completion with named directories no longer
} works.

Ah.  Well, then, there's always this:

    zmodload -i zsh/parameter &&
	eval "local +h nameddirs; nameddirs=(${(@kvq)nameddirs})"

That's simulating in shell code what we'd have to write in C in order to
make saving and restoring of the nameddir table possible.

I've thought using parameters for named directories was a bad idea for a
very long time, ever since my csh-junkie hack of `chpwd () { cwd=$PWD }'
started causing `~cwd' to show up in my prompt.  (Guess when autonamedirs
became an option rather than the default behavior.)  At the very least I
think there should be a parameter flag for "this parameter is a nameddir"
checked by unsetparam_pm() and strsetfn() before calling adduserdir().

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



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