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

Re: [bug?] named directory tex and compinit



On Oct 25,  3:03pm, Vincent Lefevre wrote:
}
} lepois:~> echo ~tex
} blah
} lepois:~> compinit
} lepois:~> echo ~tex
} zsh: no such user or named directory: tex
} 
} Is it a bug or what?

I can't reproduce this.  You should probabably `set -x' before running
compinit and look at the trace to see what may be stepping on it.

It may be a side-effect of the zsh/parameter module, which gets loaded by
compinit.  The parameter module "knows" that named directories must begin
with a slash character, and normally doesn't let you assign such values.
This can lead to some oddities like not being able to assign the value of
a parameter to itself:

zagzig% hash -d tex=blah
zagzig% echo ~tex
blah
zagzig% zmodload zsh/parameter
zagzig% echo ~tex             
blah
zagzig% echo ${(kv)nameddirs}
tex blah
zagzig% nameddirs[tex]=$nameddirs[tex] 
zsh: invalid value: blah
zagzig% echo ${(kv)nameddirs}
tex blah

(So nameddirs[tex] wasn't assigned, but it wasn't deleted either.)

However, as you can see from that output, normally loading zsh/parameter
does not affect values that are already in the hash.  There haven't been
any changes to the module since 3.1.9 that would make this different for
3.1.9-dev-7, so I'm at a loss to explain the behavior you described.

-- 
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