Proposal to add NoteType as a supported format placeholder field to ls. This would enable users to grep results based on the NoteType field, which makes categorizing notes infinitely more valuable.
SSH keys are a good example use case. Without including "SSH" in the note name, or creating a dedicated group to hold SSH keys inside of, there's no way to know which notes contain SSH keys. NoteType adds no incremental value when accessing items via lpass CLI.
example usage
## where %nt is a new placeholder for the NoteType field
❯ lpass ls --format='%ai,%nt'
foobar@example.com
all
888888888,Credit Card
999999999,SSH Key
000000000,Membership
workarounds
For those frustrated with the lack of JSON support for ls (which would also make this easier), it's possible to coerce show to behave like ls by combining a match-all basic regex via --basic-regexp with the --expand-multi option:
❯ lpass show --expand-multi --basic-regexp '.*'
Finally, adding --json will result in the desired output format:
❯ lpass show --expand-multi --basic-regexp '.*' --json
Or, shortened for brevity:
❯ lpass show -xjG '.*'
With this parseable JSON output, one can leverage jq to filter by NoteType (or any other field):
❯ lpass show -xjG '.*' | jq '.[]|select(.note|startswith("NoteType:SSH Key"))'
Proposal to add
NoteType
as a supported format placeholder field tols
. This would enable users to grep results based on theNoteType
field, which makes categorizing notes infinitely more valuable.SSH keys are a good example use case. Without including "SSH" in the note name, or creating a dedicated group to hold SSH keys inside of, there's no way to know which notes contain SSH keys. NoteType adds no incremental value when accessing items via
lpass
CLI.example usage
workarounds
For those frustrated with the lack of JSON support for
ls
(which would also make this easier), it's possible to coerceshow
to behave likels
by combining a match-all basic regex via--basic-regexp
with the--expand-multi
option:Finally, adding
--json
will result in the desired output format:Or, shortened for brevity:
With this parseable JSON output, one can leverage
jq
to filter byNoteType
(or any other field):