little fix
This commit is contained in:
parent
46031aa052
commit
8dfb824153
@ -1,5 +1,5 @@
|
|||||||
# permanently set alternative root dir
|
# permanently set alternative root dir
|
||||||
root=/home/carnager/test-store
|
# root=/path/to/root
|
||||||
|
|
||||||
# optional rofi parameters:
|
# optional rofi parameters:
|
||||||
# keep in mind that 0.15.7 has different arguments compared to
|
# keep in mind that 0.15.7 has different arguments compared to
|
||||||
|
11
rofi-pass
11
rofi-pass
@ -30,7 +30,7 @@ if [[ -n "$2" && "$1" == "--root" ]]; then
|
|||||||
root="${2}"
|
root="${2}"
|
||||||
else
|
else
|
||||||
if [[ -n $root ]]; then
|
if [[ -n $root ]]; then
|
||||||
root="${basedir}"
|
root="${root}"
|
||||||
else
|
else
|
||||||
root="$HOME/.password-store"
|
root="$HOME/.password-store"
|
||||||
fi
|
fi
|
||||||
@ -39,14 +39,11 @@ PASSWORD_STORE_DIR="${root}"
|
|||||||
|
|
||||||
# get all password files and create an array
|
# get all password files and create an array
|
||||||
list_passwords() {
|
list_passwords() {
|
||||||
if [[ -z "$root" ]]; then
|
cd "${root}"
|
||||||
passwords=( "$HOME/.password-store"/**/*.gpg )
|
passwords=( **/*.gpg )
|
||||||
else
|
|
||||||
passwords=( "${root}"/**/*.gpg )
|
|
||||||
fi
|
|
||||||
|
|
||||||
for password in "${passwords[@]}"; do
|
for password in "${passwords[@]}"; do
|
||||||
filename="${password#$root}"
|
filename="${password}"
|
||||||
filename="${filename%.gpg}"
|
filename="${filename%.gpg}"
|
||||||
echo "$filename"
|
echo "$filename"
|
||||||
done
|
done
|
||||||
|
Loading…
x
Reference in New Issue
Block a user