mirror of
				git://git.code.sf.net/p/zsh/code
				synced 2025-10-31 18:10:56 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			32 lines
		
	
	
	
		
			956 B
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			32 lines
		
	
	
	
		
			956 B
		
	
	
	
		
			Text
		
	
	
	
	
	
| #compdef tee gtee
 | |
| 
 | |
| local ret=1
 | |
| local -a context line state state_descr args
 | |
| local -A opt_args
 | |
| 
 | |
| args=(
 | |
|   '(: -)--help[display help information]'
 | |
|   '(: -)--version[display version information]'
 | |
|   '(-a --append)'{-a,--append}'[append to files instead of overwriting]'
 | |
|   '(-i --ignore-interrupts)'{-i,--ignore-interrupts}'[ignore interrupt signals]'
 | |
|   '(--output-error)-p[warn on errors writing to non-pipes]'
 | |
|   '(-p)--output-error=[specify write-error behavior]: :->errmodes'
 | |
| )
 | |
| 
 | |
| # Filter out non-GNU options if applicable
 | |
| _pick_variant gnu='Free Soft' unix --version ||
 | |
| args=( ${(@M)args:#(|*\))-[ai]\[*} )
 | |
| 
 | |
| _arguments -s -S : $args '*: :_files' && ret=0
 | |
| 
 | |
| [[ $state == errmodes ]] && {
 | |
|   args=(
 | |
|     'exit[exit on errors writing to any output]'
 | |
|     'exit-nopipe[exit on errors writing to non-pipes]'
 | |
|     'warn[warn on errors writing to any output]'
 | |
|     'warn-nopipe[warn on errors writing to non-pipes]'
 | |
|   )
 | |
|   _values 'error mode' $args && ret=0
 | |
| }
 | |
| 
 | |
| return ret
 |