0

EDIT: Im not sure why it wasn't working before, but its working fine now.

  • I added an & (to background the script)and <enter> at the end of the macro also, but it works with out it

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:

#!/bin/bash

#copy password to clipboard
security find-generic-password -w -l "gpg-lil" |pbcopy
sleep 7
#clear clipboard
pbcopy<<<""

doesn't work when called from mutt (the clipboard gets the password, but never clears) this is the Mutt macro:

#macro generic ,g "<shell-escape>$HOME/.mutt/gpg.sh"
#EDIT: below
macro generic ,g "<shell-escape>$HOME/.mutt/gpg.sh&<enter>"

Any suggestions? Thanks

Community
  • 1
  • 1

1 Answers1

0

see comments: works fine now I was editing in more than one terminal. I Think that is what was causing the weird behavior