title: Python click to restart a command with all parameters cleared
body: <p>My script below is saved in 'bike.py' and registered as <code>bike</code> shell command. I'd like to run a simple <code>bike filter -c chicago -m 1 -d 1</code> command to explore data for <code>chicago</code> as city, <code>1</code> as month and <code>1</code> as day of week. I use <code>prompt=True</code> to catch any options unspecified in the command. </p>
  
  <p>I'd also like to be able to restart the command at the end and have all the existing parameters cleared, so that the command will prompt me for <code>city</code>, <code>month</code> and <code>day of week</code> at restart. However, the code can't do that. It just runs what's inside the script and gives me error because the script can't run without the arguments passed in.</p>
  
  <p>How should I do this with click?</p>
  
  <pre class="lang-py prettyprint-override"><code>@click.group()
  @click.pass_context
  def main():
      ctx.ensure_object(dict)
  
  
  @main.command()
  @click.option('-city', '-c', prompt=True)
  @click.option('-month', '-m', prompt=True)
  @click.option('-day_of_week', '-d', prompt=True)
  @click.pass_context
  def filter(ctx, city, month, day_of_week):
      # load filtered data
      ...
  
      # restart the program
      if click.confirm('Restart to explore another dataset?') if not False:
          import sys
          sys.argv.clear()
          ctx.invoke(filter)
  </code></pre>