Open whereisaaron opened 4 years ago
My problem was there's no programmable way to find an attachment by name if you don't already know its attachment ID.
Sure, you can use lpass show
but that's intended for humans and because it'll print things like the item's note inline, parsing the output by splitting on :
isn't overly reliable. I want something I can trust to work all the time, not just most of the time.
$ lpass show "SSH Keys"
Group/SSH Keys [id: XXX]
URL: http://sn
att-XXX-YYY: id_rsa.pub.txt
att-XXX-YYY: id_rsa.txt
Reprompt: Yes
Notes: several lines
of text and random punctuation
and maybe a
https://url/or/two <---- Would be treated as the key-value pair "http" = "//url/or/two"
If you use the --json
flag, it just plain doesn't show you what is attached to that item.
$ lpass show --json "SSH Keys"
[
{
"id": "XXXX",
"name": "SSH Keys",
"fullname": "Group/SSH Keys",
"username": "",
"password": "",
"last_modified_gmt": "YYYY",
"last_touch": "ZZZZ",
"group": "Group",
"url": "http://sn",
"note": "..."
}
]
Nice Rust article @Michael-F-Bryan. With regards to the original goal though, is this not that thing in the
lpass
client?https://github.com/lastpass/lastpass-cli/commit/a4532a94c3b61f18e6cda5e4c56976e9a604203e