title: bash script works in terminal, not as expected from Mutt (macro)
body: <h3>EDIT: Im not sure why it wasn't working before, but its working fine now.</h3>
  <ul>
  <li>I added an <code>&amp;</code> (to background the script)and <code>&lt;enter&gt;</code> at the end of the macro also, but it works with out it</li>
  </ul>
  <p>I would like to copy a password from my OS X keychain into my clipboard. Then clear the clipboard after 7 seconds (from a Mutt macro)
  This works from my terminal:</p>
  <pre><code>#!/bin/bash
  
  #copy password to clipboard
  security find-generic-password -w -l &quot;gpg-lil&quot; |pbcopy
  sleep 7
  #clear clipboard
  pbcopy&lt;&lt;&lt;&quot;&quot;
  </code></pre>
  <p>doesn't work when called from mutt (the clipboard gets the password, but never clears)
  this is the Mutt macro:</p>
  <pre><code>#macro generic ,g &quot;&lt;shell-escape&gt;$HOME/.mutt/gpg.sh&quot;
  #EDIT: below
  macro generic ,g &quot;&lt;shell-escape&gt;$HOME/.mutt/gpg.sh&amp;&lt;enter&gt;&quot;
  </code></pre>
  <p>Any suggestions?
  Thanks</p>