Fixed pass menu not allowing directory traversing
This commit is contained in:
parent
78dfa80712
commit
6f2a8935fa
7
pass
7
pass
@ -1,12 +1,11 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# posix password manager - developed by acidvegas (https://git.acid.vegas/pass)
|
# posix password manager - developed by acidvegas (https://git.acid.vegas/pass)
|
||||||
|
|
||||||
umask 077
|
umask 077
|
||||||
export GPG_TTY=$(tty)
|
export GPG_TTY=$(tty)
|
||||||
|
|
||||||
GPG_ID="acidvegas" # change me
|
GPG_ID="acidvegas" # change me
|
||||||
GPG_OPTS="-q --yes --compress-algo=none --no-encrypt-to --batch"
|
GPG_OPTS="-q --yes --compress-algo=none --no-encrypt-to --batch"
|
||||||
METHOD="copy"
|
METHOD="type"
|
||||||
PASS_DIR=$HOME/.secrets
|
PASS_DIR=$HOME/.secrets
|
||||||
|
|
||||||
if [ -z $EDITOR ]; then
|
if [ -z $EDITOR ]; then
|
||||||
@ -54,9 +53,9 @@ menu() {
|
|||||||
while :
|
while :
|
||||||
do
|
do
|
||||||
if [ $cwd = $PASS_DIR ]; then
|
if [ $cwd = $PASS_DIR ]; then
|
||||||
cmd=$(ls -p $cwd | dmenu "$@")
|
cmd=$(ls -p $cwd | dmenu -l 5 "$@")
|
||||||
else
|
else
|
||||||
cmd=$($(echo ".." && ls -p $cwd) | dmenu "$@")
|
cmd=$({ echo ".."; ls -p $cwd | sed 's/\.gpg$//'; } | dmenu -l 5 "$@")
|
||||||
fi
|
fi
|
||||||
if [ -z $cmd ]; then
|
if [ -z $cmd ]; then
|
||||||
break
|
break
|
||||||
|
Loading…
Reference in New Issue
Block a user