From b1378c422a15dffe4b0b0b68c4aff0d529e72a5d Mon Sep 17 00:00:00 2001 From: Gil Portenseigne Date: Tue, 14 May 2024 17:48:34 +0200 Subject: [PATCH] customization pour chercher dans l'arbo des mdps directement --- .local/bin/passmenu2 | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.local/bin/passmenu2 b/.local/bin/passmenu2 index 3847219..8211515 100755 --- a/.local/bin/passmenu2 +++ b/.local/bin/passmenu2 @@ -17,14 +17,12 @@ PREVSELECTION="" SELECTION="" while [ "$DONE" -eq 0 ] ; do - password_files=( "$STARTDIR"/* ) - password_files=( "${password_files[@]#"$STARTDIR"/}" ) - password_files=( "${password_files[@]%.gpg}" ) + password_files=( `find "$STARTDIR" -iname "*.gpg" | sed -e 's/\.gpg//' -e 's#^.*password-store/##' ` ) if [ "$LEVEL" -ne 0 ] ; then password_files=(".." "${password_files[@]}") - fi entry=$(printf '%s\n' "${password_files[@]}" | dmenu "$@" -l 15) + fi echo "entry: $entry" if [ -z "$entry" ] ; then