mirror of
				git://git.code.sf.net/p/zsh/code
				synced 2025-10-31 18:10:56 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			16 lines
		
	
	
	
		
			434 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
	
		
			434 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
 | |
|     builtin cd $1 2>/dev/null && pwd
 | |
| )
 |