title: Auto complete command-line arguments based on command and subcommand in tcsh
body: <p>I am using tcsh shell and trying to setup autocomplete for a wrapper script written in perl. The usage of the script is similar to how SVN works and looks something like this:</p>
  
  <p><code>command first_argument -option1 option_argument option2 option2_argument ...</code></p>
  
  <p>The valid choices for <em>option</em> depend on <em>first_argument</em> and corresponding <em>arguments</em> can be file names or a custom list depending on the <em>-option</em> provided.
  Is it possible to configure the <em>complete</em> command to look at <em>"command first_argument"</em> instead of <em>command</em>?</p>
  
  <p>If possible, I would like to avoid writing a full blown argument handler to do this, since the option list is long. I have tried using single quotes as well as double quotes to say something like <code>complete "command first_argument" 'completion options'</code>, but that does not seem to work. Please help.</p>
  
  <p>Best Regards,</p>
  
  <p>Abhishek</p>