mirror of
				git://git.code.sf.net/p/zsh/code
				synced 2025-11-03 19:11:34 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			23 lines
		
	
	
	
		
			590 B
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
	
		
			590 B
		
	
	
	
		
			Text
		
	
	
	
	
	
#compdef zsh
 | 
						|
 | 
						|
local curcontext=$curcontext state state_descr line expl
 | 
						|
typeset -A opt_args
 | 
						|
 | 
						|
_arguments -S -s : \
 | 
						|
  '*-o+[set named option]:option:_options' \
 | 
						|
  '*+o+[unset named option]:option:_options' \
 | 
						|
  '(1 -s --shinstdin)'{-s,--shinstdin}'[read commands from standard input]' \
 | 
						|
  '(-)-b[end of option processing, like --]' \
 | 
						|
  '(1 -)-c[run a command]:command:_cmdstring' \
 | 
						|
  '(-)1:script file:_files' \
 | 
						|
  '*::script arguments:->args' -- && return 0
 | 
						|
 | 
						|
case $state in
 | 
						|
  (args)
 | 
						|
    if [[ -n ${opt_args[(I)-c|-s|--shinstdin]} ]]; then
 | 
						|
      _files
 | 
						|
    else
 | 
						|
      _normal
 | 
						|
    fi
 | 
						|
    ;;
 | 
						|
esac
 |