Skip to content

Instantly share code, notes, and snippets.

View kuttor's full-sized avatar
💭
Livin' the dream ... One repo at a time.

Andrew kuttor

💭
Livin' the dream ... One repo at a time.
View GitHub Profile
@estum
estum / README.rdoc
Last active August 23, 2023 13:47
iTerm: Coprocess-script to auto-paste sudo password from keychain

iTerm Coprocess-script to auto-paste sudo password from keychain

Usage

  1. Open Keychain Access.app and create new object using the host as a name (“example.com”), username with sudo rights (“user”) and it’s password.

  2. Add a trigger for iTerm’s profile (‘Advanced‘ tab):

    • Regular Expression: \$ sudo

    • Action: Run Coprocess…

    • Parameters: /path/to/iterm_reply_with_keychain.rb [email protected]