zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: vcs_info: Make use of cd's -q option
@ 2010-03-03 21:30 Frank Terbeck
  0 siblings, 0 replies; only message in thread
From: Frank Terbeck @ 2010-03-03 21:30 UTC (permalink / raw)
  To: zsh-workers; +Cc: Mikael Magnusson, Bart Trojanowski

---
 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@bewatermyfriend.org>
 ## 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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-03-03 21:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-03 21:30 PATCH: vcs_info: Make use of cd's -q option Frank Terbeck

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).