Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] make OLDPWD influence 'cd -'
- X-seq: zsh-workers 29441
- From: hanpingtian <hanpingtian@xxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH] make OLDPWD influence 'cd -'
- Date: Fri, 3 Jun 2011 11:52:02 +0800 (CST)
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
I found OLDPWD's value doesn't influence 'cd -' if changed before run,
like what bash will do:
[hpt@hpt]~% echo $OLDPWD
/home/hpt
[hpt@hpt]~% vared OLDPWD
/tmp
[hpt@hpt]~% echo $OLDPWD
/tmp
[hpt@hpt]~% cd -
~
[hpt@hpt]~% pwd
/home/hpt
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
[hpt@hpt]/tmp%
Attachment:
0001-make-OLDPWD-settable.patch
Description: Binary data
Messages sorted by:
Reverse Date,
Date,
Thread,
Author