mirror of
				git://git.code.sf.net/p/zsh/code
				synced 2025-10-31 18:10:56 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			12 lines
		
	
	
	
		
			306 B
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			12 lines
		
	
	
	
		
			306 B
		
	
	
	
		
			Text
		
	
	
	
	
	
| #autoload
 | |
| 
 | |
| local expl ports
 | |
| 
 | |
| if ! zstyle -a ":completion${curcontext}:ports" ports ports; then
 | |
|   (( $+_cache_ports )) ||
 | |
|       : ${(A)_cache_ports:=${${(M)${${(f)"$(</etc/services)"}:#\#*}#*/tcp}%%[ 	]*}}
 | |
| 
 | |
|   ports=( "$_cache_ports[@]" )
 | |
| fi
 | |
| 
 | |
| _wanted ports expl port && compadd "$@" "$expl[@]" - "$ports[@]"
 |