Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] Functions/Misc/relative: use -q with cd
- X-seq: zsh-workers 41018
- From: Daniel Hahler <genml+zsh-workers@xxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH] Functions/Misc/relative: use -q with cd
- Date: Thu, 27 Apr 2017 22:35:37 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=thequod.de; h= x-mailer:message-id:date:date:subject:subject:from:from:received :received:received; s=postfix2; t=1493325339; bh=oKE2P/VQhSUmk7C PfHfL2yOYqEN3h80b9U1Z0kn3AI0=; b=DF4ntnQ4L6zwfose0GfBvIlqriNQGpZ v86hkH7GuhfZcJFOn6IQyVLEudrKBioM34azmeoiyWRLk+IhQwxIkBkgGo4PU/gB TySaMQ/6JPcUze9N3ekXXXC0x5AEMVt/7Zh0B6I/v+mCb534SYlYfZZM2fBdnJPi OUV5juLCK5tE=
- 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
From: Daniel Hahler <git@xxxxxxxxxx>
This skips chpwd function(s), which only add overhead and might cause
unwanted side-effects.
---
Functions/Misc/relative | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Functions/Misc/relative b/Functions/Misc/relative
index 432f2e2da..db3b5a587 100644
--- a/Functions/Misc/relative
+++ b/Functions/Misc/relative
@@ -8,8 +8,8 @@ emulate -L zsh || return 1
[[ $1 -ef $2 ]] && print ${3:-.} && return
# The simplest way to eliminate symlinks and ./ and ../ in the paths:
-1=$(cd $1; pwd -r)
-2=$(cd $2; pwd -r)
+1=$(cd -q $1; pwd -r)
+2=$(cd -q $2; pwd -r)
local -a cur abs
cur=(${(s:/:)2}) # Split 'current' directory into cur
--
2.12.2
Messages sorted by:
Reverse Date,
Date,
Thread,
Author