1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-28 17:10:59 +01:00

Frank: 27768: shut up cd some more

This commit is contained in:
Peter Stephenson 2010-03-04 10:03:00 +00:00
parent b64f7a8bcc
commit de3159d73a
2 changed files with 9 additions and 13 deletions

View file

@ -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; )