Last active
December 2, 2016 09:42
-
-
Save gizmomogwai/227aea5197a7fb6b5b299d13f2dcebe9 to your computer and use it in GitHub Desktop.
fish function to copy a lastpass password to the clipboard
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
function copy-lp-pass -d "copy lp pass" | |
if lpass ls | fzf > /tmp/fzf.result | |
set lp_account (cat /tmp/fzf.result | cut -d ' ' -f 1) | |
set lp_pass (lpass show $lp_account | grep 'Password:' | cut -d ' ' -f 2) | |
echo -n $lp_pass | copy | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment