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

Re: TRAPZERR() in chpwd()



On May 1,  1:13pm, Paul Ackersviller wrote:
} Subject: TRAPZERR() in chpwd()
}
} [...] what I meant by `tests' was internal shell tests as
} opposed to external programs or other commands.  Here's a simplified example
} of what I'm seeing.
} 	TRAPZERR () { echo exit code $?; }
} 	chpwd () { [ -h $PWD ] && echo symlink; true; }
} When I change to a directory that's not a soft link, I'm getting the `exit
} code' message from 3.1.7-pre-1, whereas I never have with earlier versions.

Hmmmmm ... trying some assorted older builds I have around ...

zagzig% echo $VERSION
zsh 2.4.306 beta
zagzig% TRAPZERR () { echo exit code $?; }
zagzig% chpwd () { [ -h $PWD ] && echo symlink; true; }
zagzig% cd /tmp
exit code 1
zagzig% cd /hosts
symlink
zagzig%

zagzig% echo $ZSH_VERSION
3.0.6-test-1
zagzig% TRAPZERR () { echo exit code $?; }
zagzig% chpwd () { [ -h $PWD ] && echo symlink; true; }
zagzig% cd /tmp
zagzig% cd /hosts
symlink
zagzig% 

This may be a fix that went in to 3.0.x and was never propagated to 3.1.x,
or it may be a bug that was introduced in 3.0.x and fixed in 3.1.x.  I'm
not sure which at this point.

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



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