This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun chomp (str) | |
"Chomp leading and tailing whitespace from STR." | |
(while (string-match "\\`\n+\\|^\\s-+\\|\\s-+$\\|\n+\\'" str) | |
(setq str (replace-match "" t t str))) str) | |
(defun get-keychain-password (account-name) | |
"Gets `account` keychain password from OS X Keychain" | |
(chomp | |
(shell-command-to-string | |
(concatenate |