Send again, get list CCed. Thanks. At 2011-06-03 14:59:36£¬"Bart Schaefer" wrote: >On Jun 3, 11:52am, hanpingtian wrote: >} Subject: [PATCH] make OLDPWD influence 'cd -' >} >} This patch will let zsh check OLDPWD before run 'cd -', so let OLDPWD >} influence it: >} [hpt@hpt]~% echo $OLDPWD >} /home/hpt >} [hpt@hpt]~% vared OLDPWD >} /tmp >} [hpt@hpt]~% cd - >} /tmp >} [hpt@hpt]/tmp% pwd >} /tmp > >Hmm. Aside from the fact that this makes OLDPWD sort of half a special >variable -- it at least moves it from the "set by the shell" category >into "used by the shell" -- I think putting this behavior into the "cd" >command may not be the best place for it. > >In particular, it means that "cd -" and "cd ~-" become different things, >where currently they're all equivalent. Further, it affects "pushd -" >so that it no longer refers to the top of the directory stack. Patch updated. Please have a look. Thanks.