From 9a619c5ed3e91d2e356097e805267eeb19f4b3b4 Mon Sep 17 00:00:00 2001 From: Patrick Spek Date: Thu, 10 Oct 2019 15:41:08 +0200 Subject: Add lastpass-cli wrapper --- .local/bin/lpass | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 .local/bin/lpass (limited to '.local/bin') diff --git a/.local/bin/lpass b/.local/bin/lpass new file mode 100755 index 0000000..1362ad1 --- /dev/null +++ b/.local/bin/lpass @@ -0,0 +1,21 @@ +#! /usr/bin/env sh + +readonly BIN=/usr/bin/lpass + +main() +{ + # Password is stored in pass, read it from there when trying to login + if [ "$1" = "login" ] + then + export LPASS_DISABLE_PINENTRY=1 + shift + + pass show "websites/lastpass.com/$1" | "$BIN" login --trust "$@" + return + fi + + # Hand off execution to the regular binary + exec "$BIN" "$@" +} + +main "$@" -- cgit v1.1