Filter login type using op cli

This commit is contained in:
Felipe M 2021-02-09 14:07:24 +01:00
parent 91c9b54762
commit e31bd672ee
Signed by: fmartingr
GPG Key ID: 716BC147715E716F
1 changed files with 2 additions and 4 deletions

View File

@ -29,7 +29,7 @@ CMD_ITEM_SELECT = "echo -e '{items}' | rofi -dmenu -p 'Select login'"
CMD_LIST_PROMPT = "echo {items} | rofi -dmenu"
CMD_OP_LOGIN = "echo -n {password} | op signin {subdomain} --output=raw"
CMD_OP_LIST_ITEMS = "op list items --session={session_id}"
CMD_OP_LIST_ITEMS = "op list items --categories Login --session={session_id}"
CMD_OP_GET_ITEM = "op get item {uuid} --session={session_id}"
CMD_OP_GET_TOTP = "op get totp {uuid} --session={session_id}"
@ -187,9 +187,7 @@ class OnePass:
host = extract_host(url)
def filter_host(item):
"""Exclude items that does not match host and are not a login"""
if item["templateUuid"] != "001":
return False
"""Exclude items that does not match host """
if "url" in item["overview"]:
return host in item["overview"]["url"]
return False