Hello,

I'm afraid my email client messed up the patch's leading spaces. Here is the file produced by `git format-patch` attached.

Regards,
-- Théophile
From b31e0744fd75d0f6a1b172037d970ca6f79267dd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Th=C3=A9ophile=20Bastian?= <[email protected]>
Date: Mon, 20 Feb 2023 11:23:19 +0100
Subject: [PATCH] Passmenu: follow symlinks

Bash's globstar option does not follow symlinks; however, symlinks can
be useful to have multiple password-store repositories behaving like a
single one (eg. for shared repositories). As passmenu is based on
globstar to find all the password entries, it previously failed to
follow symlinks and find those passwords.
---
 contrib/dmenu/passmenu | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/contrib/dmenu/passmenu b/contrib/dmenu/passmenu
index 76d92ab..c2ab1fc 100755
--- a/contrib/dmenu/passmenu
+++ b/contrib/dmenu/passmenu
@@ -1,7 +1,5 @@
 #!/usr/bin/env bash
 
-shopt -s nullglob globstar
-
 typeit=0
 if [[ $1 == "--type" ]]; then
 	typeit=1
@@ -20,7 +18,7 @@ else
 fi
 
 prefix=${PASSWORD_STORE_DIR-~/.password-store}
-password_files=( "$prefix"/**/*.gpg )
+password_files=( $(find -L "$prefix" -name '*.gpg' | sort) )
 password_files=( "${password_files[@]#"$prefix"/}" )
 password_files=( "${password_files[@]%.gpg}" )
 
-- 
2.39.2

Reply via email to