Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: vcs_info: Make use of cd's -q option
- X-seq: zsh-workers 27768
- From: Frank Terbeck <ft@xxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: PATCH: vcs_info: Make use of cd's -q option
- Date: Wed, 3 Mar 2010 22:30:46 +0100
- Cc: Mikael Magnusson <mikachu@xxxxxxxxx>, Bart Trojanowski <bart@xxxxxxxxx>
- 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
---
Functions/VCS_Info/VCS_INFO_realpath | 15 +++------------
1 files changed, 3 insertions(+), 12 deletions(-)
diff --git a/Functions/VCS_Info/VCS_INFO_realpath b/Functions/VCS_Info/VCS_INFO_realpath
index c0f48a4..ce4a694 100644
--- a/Functions/VCS_Info/VCS_INFO_realpath
+++ b/Functions/VCS_Info/VCS_INFO_realpath
@@ -2,15 +2,6 @@
## Written by Frank Terbeck <ft@xxxxxxxxxxxxxxxxxxx>
## Distributed under the same BSD-ish license as zsh itself.
-# a portable 'readlink -f'
-# forcing a subshell, to ensure chpwd() is not removed
-# from the calling shell (if VCS_INFO_realpath() is called
-# manually).
-
-setopt localoptions NO_shwordsplit
-
-(
- (( ${+functions[chpwd]} )) && unfunction chpwd
- setopt chaselinks
- builtin cd $1 2>/dev/null && pwd
-)
+setopt localoptions NO_shwordsplit chaselinks
+# -q to avoid chpwd() invocations
+( builtin cd -q $1 2>/dev/null && pwd; )
--
1.7.0
Messages sorted by:
Reverse Date,
Date,
Thread,
Author