From 6f2a8935fa90c079833d30a42d7ae83126614c3b Mon Sep 17 00:00:00 2001 From: acidvegas Date: Sat, 26 Aug 2023 16:04:35 -0400 Subject: [PATCH] Fixed pass menu not allowing directory traversing --- pass | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pass b/pass index 2b8301c..ea202d2 100755 --- a/pass +++ b/pass @@ -1,12 +1,11 @@ #!/bin/sh # posix password manager - developed by acidvegas (https://git.acid.vegas/pass) - umask 077 export GPG_TTY=$(tty) GPG_ID="acidvegas" # change me GPG_OPTS="-q --yes --compress-algo=none --no-encrypt-to --batch" -METHOD="copy" +METHOD="type" PASS_DIR=$HOME/.secrets if [ -z $EDITOR ]; then @@ -54,9 +53,9 @@ menu() { while : do if [ $cwd = $PASS_DIR ]; then - cmd=$(ls -p $cwd | dmenu "$@") + cmd=$(ls -p $cwd | dmenu -l 5 "$@") else - cmd=$($(echo ".." && ls -p $cwd) | dmenu "$@") + cmd=$({ echo ".."; ls -p $cwd | sed 's/\.gpg$//'; } | dmenu -l 5 "$@") fi if [ -z $cmd ]; then break