commit 8643baf36327a11c2a49e7d9a69cd6713ec7cac0 parent 4af54e25d8753d6d6b0071bfe059d018d746b0de Author: Bharatvaj Hemanth <bharatvaj@yahoo.com> Date: Sun, 16 Jun 2024 02:30:26 +0530 Fix the argument not working when totp/ is selected in pfs Diffstat:
M | .local/bin/sh/pfs | | | 12 | ++++-------- |
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/.local/bin/sh/pfs b/.local/bin/sh/pfs @@ -6,11 +6,7 @@ cd "${PASSWORD_STORE_DIR}" || exit 1 selection="$(find -L . -name '*.gpg' | sed 's/.gpg$//g' | ${FUZZER})" - -test -z "${selection}" || { - case ${selection} in - *totp/*) pass otp "${selection}" ;; - *) spm ${1:-"show"} "${selection}" ;; - esac -} - +case "${selection}" in + *totp/*) pass ${1:-"otp"} "${selection}" ;; + ?*)pass ${1:-"show"} "${selection}" ;; +esac