Skip to content

Instantly share code, notes, and snippets.

@Gabelbombe
Created October 26, 2016 15:46
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Gabelbombe/9fd8810442daf64686a34f885e18be01 to your computer and use it in GitHub Desktop.
Save Gabelbombe/9fd8810442daf64686a34f885e18be01 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
## Alias GAuth to copy current to clipboard
function gauth() {
[ ! -z "${1}" ] && {
/Users/$(whoami)/go/bin/gauth |grep -i "aws ${1}" |sed 's/AWS //' |awk '{print$3}' |pbcopy
echo -e "Copied $(pbpaste) clipboard!"
} || {
/Users/$(whoami)/go/bin/gauth
}
}
alias mfa='gauth'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment