mirror of
				git://git.code.sf.net/p/zsh/code
				synced 2025-10-31 06:00:54 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			30 lines
		
	
	
	
		
			689 B
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
	
		
			689 B
		
	
	
	
		
			Text
		
	
	
	
	
	
| #autoload
 | |
| #
 | |
| # _perl_basepods - zsh completion function
 | |
| #
 | |
| # Adam Spiers <adam@spiers.net>
 | |
| #
 | |
| # Calculate all installed Perl base pods (perlfunc, perlfaq etc.).
 | |
| # The result is cached for future use.
 | |
| #
 | |
| 
 | |
| if [[ ${+_perl_basepods} -eq 0 ]]; then
 | |
|   typeset -agU _perl_basepods
 | |
| 
 | |
|   if which basdepods >/dev/null; then
 | |
|     _perl_basepods=( ${$(basepods):t:r} )
 | |
|   else
 | |
|     local podpath
 | |
|     podpath=$(perl -MConfig -e 'print "$Config{installprivlib}/pod"')
 | |
|     if [[ ! -e $podpath/perl.pod ]]; then
 | |
|       echo "Couldn't find perl.pod from Config.pm; giving up."
 | |
|       return 1
 | |
|     else
 | |
|       cd $podpath
 | |
|       _perl_basepods=( *.pod(:r:t) )
 | |
|       cd $OLDPWD
 | |
|     fi
 | |
|   fi
 | |
| fi
 | |
| 
 | |
| compadd - $_perl_basepods
 |