parameters: (*param_decls, **attrs)
return_statement: return decorator
docstring: Shortcut for confirmation prompts that can be ignored by passing
      ``--yes`` as parameter.
  
      This is equivalent to decorating a function with :func:`option` with
      the following parameters::
  
          def callback(ctx, param, value):
              if not value:
                  ctx.abort()
  
          @click.command()
          @click.option('--yes', is_flag=True, callback=callback,
                        expose_value=False, prompt='Do you want to continue?')
          def dropdb():
              pass
docstring_summary: Shortcut for confirmation prompts that can be ignored by passing
      ``--yes`` as parameter.
docstring_tokens: Shortcut for confirmation prompts that can be ignored by passing -- yes as parameter .
function: def confirmation_option(*param_decls, **attrs):
      """Shortcut for confirmation prompts that can be ignored by passing
      ``--yes`` as parameter.
  
      This is equivalent to decorating a function with :func:`option` with
      the following parameters::
  
          def callback(ctx, param, value):
              if not value:
                  ctx.abort()
  
          @click.command()
          @click.option('--yes', is_flag=True, callback=callback,
                        expose_value=False, prompt='Do you want to continue?')
          def dropdb():
              pass
      """
      def decorator(f):
          def callback(ctx, param, value):
              if not value:
                  ctx.abort()
          attrs.setdefault('is_flag', True)
          attrs.setdefault('callback', callback)
          attrs.setdefault('expose_value', False)
          attrs.setdefault('prompt', 'Do you want to continue?')
          attrs.setdefault('help', 'Confirm the action without prompting.')
          return option(*(param_decls or ('--yes',)), **attrs)(f)
      return decorator
function_tokens: def confirmation_option ( * param_decls , * * attrs ) : def decorator ( f ) : def callback ( ctx , param , value ) : if not value : ctx . abort ( ) attrs . setdefault ( 'is_flag' , True ) attrs . setdefault ( 'callback' , callback ) attrs . setdefault ( 'expose_value' , False ) attrs . setdefault ( 'prompt' , 'Do you want to continue?' ) attrs . setdefault ( 'help' , 'Confirm the action without prompting.' ) return option ( * ( param_decls or ( '--yes' , ) ) , * * attrs ) ( f ) return decorator