Skip to content

Instantly share code, notes, and snippets.

@gizmomogwai
Created December 2, 2016 09:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gizmomogwai/b4bdc508a8e35f9154f56fcdd23ecf84 to your computer and use it in GitHub Desktop.
Save gizmomogwai/b4bdc508a8e35f9154f56fcdd23ecf84 to your computer and use it in GitHub Desktop.
fish function to copy lastpass username to the clipboard
function copy-lp-name -d "copy lp name"
if lpass ls | fzf > /tmp/fzf.result
set lp_account (cat /tmp/fzf.result | cut -d ' ' -f 1)
set lp_username (lpass show $lp_account | grep 'Username:' | cut -d ' ' -f 2)
echo -n $lp_username | copy
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment