From 5fabeb4d89d791c0212dcee6e1885254fa3aa885 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Sun, 21 May 2017 00:27:04 +0200 Subject: [PATCH] alias for copying public SSH & GPG keys --- aliases | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/aliases b/aliases index 57e95a6..9e99653 100644 --- a/aliases +++ b/aliases @@ -20,8 +20,11 @@ alias update='update-everything.sh' alias ip="dig +short myip.opendns.com @resolver1.opendns.com" alias localip="ipconfig getifaddr en1" -# Copy public key to pasteboard -alias pubkey="more ~/.ssh/id_rsa.pub | pbcopy | printf '=> Public key copied to pasteboard.\n'" +# Copy SSH public key to pasteboard +alias pubkey="more ~/.ssh/id_rsa.pub | pbcopy | printf '$(tput setaf 64)✓ Public SSH key copied to pasteboard.$(tput sgr0)\n'" + +# Copy GPG public key to pasteboard +alias gpgpubkey="gpg --export --armor 0xDD7831FC | pbcopy | printf '$(tput setaf 64)✓ Public GPG key copied to pasteboard.$(tput sgr0)\n'" # Recursively delete `.DS_Store` files alias cleanup="find . -type f -name '*.DS_Store' -ls -delete"