title: Add a keychain to search list?
body: <p>I need to add a .keychain file to my keychains search list for some automated build tools. Currently I'm using <code>security list-keychains</code> command:</p>
  
  <pre><code>list-keychains [-h] [-d user|system|common|dynamic] [-s [keychain...]]
          Display or manipulate the keychain search list.
  </code></pre>
  
  <p>This command let's you set the entire keychain search list, but it does not provide a way to simply add another keychain. So adding a keychain becomes a 2 step process.</p>
  
  <ol>
  <li>Run list-keychains and parse the output</li>
  <li>Then do something like <code>list-keychains -s ${existing_chains} ${new_keychain}</code></li>
  </ol>
  
  <p>While this works, it seems overly complicated and introduces a race condition.</p>
  
  <p>Also it seems like <code>open my.keychain</code> will add it to the search list, but I tend to avoid using commands like <code>open</code> in scripting or headless environments.</p>
  
  <p>Is there a simpler or better way to add a keychain to the search list?</p>