title: How do I create an optional argument that is an alias of another argument with a certain value?
body: <p>I need to edit a Python 3 program, let's call it <code>./foo</code>, that uses <code>argeparse</code> to parse its argument list. </p>
  
  <p>Currently, this program allows one to specify an optional input file on the command line. If it is not specified, then foo reads the file <code>setting.txt</code></p>
  
  <pre><code>$ ./foo 
  $ ./foo --input my_settings.txt
  </code></pre>
  
  <p>The code that does this pretty simple:</p>
  
  <pre><code>parser.add_argument(
      '--input',
      default='settings.txt'
  )
  </code></pre>
  
  <p>The intent was to give personalized settings, but in practice, 99% of people who use the <code>--input</code> argument specify one particular file <code>other_settings.txt</code>. I'd like to add a mutually exclusive convenience argument, <code>--common</code> that is equivalent to the <code>--input other_settings.txt</code></p>
  
  <pre><code># These are the same.
  $ ./foo --input other_settings.txt
  $ $ ./foo --common
  </code></pre>
  
  <p>What is the recommended way to accomplish this? For example, should I have both arguments write to the same <code>dest</code> value? Do I have them write to separate destinations and then add some logic inside the body of the code, similar as was done <a href="https://stackoverflow.com/questions/38024501/argparse-shortcut-option-for-combining-other-options">here</a>?</p>