mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-04 22:51:42 +02:00
16 lines
426 B
Bash
16 lines
426 B
Bash
## vim:ft=zsh
|
|
## 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
|
|
cd $1 2>/dev/null && pwd
|
|
)
|