zsh-workers
 help / color / mirror / code / Atom feed
* cdpath and empty string
@ 2013-08-07  8:49 Phil Pennock
  2013-08-08  1:23 ` Bart Schaefer
  0 siblings, 1 reply; 2+ messages in thread
From: Phil Pennock @ 2013-08-07  8:49 UTC (permalink / raw)
  To: zsh-workers

Finally got irritated enough to track down what's required to trigger
what looks like a zsh bug.

    % mkdir /tmp/T1 /tmp/T2 /tmp/T2/T1
    % zsh -f
    redoubt% typeset -a cdpath
    redoubt% cdpath=(/tmp/T1 '')
    redoubt% cd /tmp/T2
    redoubt% cd T1
    /tmp/T1/T1
    redoubt% pwd
    /tmp/T2/T1
    redoubt% echo $PWD
    /tmp/T1/T1
    redoubt% cd .
    redoubt% echo $PWD
    /tmp/T2/T1


If $cdpath has an empty string at the end (in my case, using
"${cdpath[@]}" instead of ${cdpath[@]} when prepending elements), then
"cd foo" for unqualified 'foo' which is only found relative to cwd will
always print $cdpath[1]/foo while cd'ing into ./foo.

$PWD is left corrupted, fixed by "cd ."; pwd is fine.

I haven't figured out where this is happening; I know it's in the C, but
reading the code I can't tell where and I need to get back to work
instead of continuing to investigate.  :(

Any thoughts?

-Phil


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-08-08  1:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-07  8:49 cdpath and empty string Phil Pennock
2013-08-08  1:23 ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).