pass_typer: Use a dict for deduping paths to preserve order

This commit is contained in:
Adam Goldsmith 2022-03-28 22:31:38 -04:00
parent 99b4d9f2fe
commit fc3432112e
1 changed files with 3 additions and 1 deletions

View File

@ -47,7 +47,9 @@ def select_and_type(server_name: str) -> None:
PASSWORD_STORE.glob(f"servers/**/{server_name}.gpg"),
PASSWORD_STORE.glob(f"servers/**/*@{server_name}.gpg"),
)
file_list = {str(f.relative_to(PASSWORD_STORE).with_suffix("")) for f in files}
file_list = list(
dict.fromkeys(str(f.relative_to(PASSWORD_STORE).with_suffix("")) for f in files)
)
selected = rofi_select(file_list)
password = get_password(selected)