blob: ba4a12a2adc77fc3c22ceb1af68e97528d1b08df (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
VCS_INFO_realpath () { #{{{
# a portable 'readlink -f'
# forcing a subshell, to ensure chpwd() is not removed
# from the calling shell (if VCS_INFO_realpath() is called
# manually).
(
(( ${+functions[chpwd]} )) && unfunction chpwd
setopt chaselinks
cd $1 2>/dev/null && pwd
)
}
|