commit 4af54e25d8753d6d6b0071bfe059d018d746b0de
parent a828c7545b6b36994f4e662dfc754aebdc6a188c
Author: Bharatvaj Hemanth <bharatvaj@yahoo.com>
Date: Sat, 30 Mar 2024 14:48:08 +0530
parent a828c7545b6b36994f4e662dfc754aebdc6a188c
Author: Bharatvaj Hemanth <bharatvaj@yahoo.com>
Date: Sat, 30 Mar 2024 14:48:08 +0530
Use the same script pfs for getting both normal and otp keys Remove pofs
2 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/.local/bin/sh/pfs b/.local/bin/sh/pfs @@ -6,5 +6,11 @@ cd "${PASSWORD_STORE_DIR}" || exit 1 selection="$(find -L . -name '*.gpg' | sed 's/.gpg$//g' | ${FUZZER})" -test -z "${selection}" || pass ${1} "${selection}" + +test -z "${selection}" || { + case ${selection} in + *totp/*) pass otp "${selection}" ;; + *) spm ${1:-"show"} "${selection}" ;; + esac +}
diff --git a/.local/bin/sh/pofs b/.local/bin/sh/pofs @@ -1,9 +0,0 @@ -#!/bin/sh -eu - -# reliable password fuzzy searcher - -cd "${PASSWORD_STORE_DIR}" || exit 1 - -selection="$(find -L . -wholename "./*totp/*.gpg" | sed 's/.gpg$//g' | ${FUZZER} -q "$*")" - -test -z "${selection}" || pass otp "${selection}"