mirror of
https://github.com/kmein/niveum
synced 2026-03-16 10:11:08 +01:00
passmenu: fix
This commit is contained in:
@@ -1,15 +1,15 @@
|
|||||||
{ writers, wofi, pass, libnotify, ... }:
|
{ writers, wofi, pass, fd, libnotify, ... }:
|
||||||
writers.writeBashBin "passmenu" ''
|
writers.writeBashBin "passmenu" ''
|
||||||
shopt -s nullglob globstar
|
shopt -s nullglob globstar
|
||||||
|
|
||||||
IFS=$'\n'
|
IFS=$'\n'
|
||||||
|
|
||||||
prefix=$(readlink -f $${PASSWORD_STORE_DIR-~/.password-store})
|
prefix=$(readlink -f ''${PASSWORD_STORE_DIR-~/.password-store})
|
||||||
password_files=( $( fd -L ".gpg\$" "$prefix" ) )
|
password_files=( $( ${fd}/bin/fd -L ".gpg\$" "$prefix" ) )
|
||||||
password_files=( "$${password_files[@]#"$prefix"/}" )
|
password_files=( "''${password_files[@]#"$prefix"/}" )
|
||||||
password_files=( "$${password_files[@]%.gpg}" )
|
password_files=( "''${password_files[@]%.gpg}" )
|
||||||
|
|
||||||
password=$( printf '%s\n' "$${password_files[@]}" | ${wofi}/bin/wofi -i -k /dev/null -d menu -- "$@" )
|
password=$( printf '%s\n' "''${password_files[@]}" | ${wofi}/bin/wofi -i -k /dev/null -d menu -- "$@" )
|
||||||
|
|
||||||
[[ -n $password ]] || exit
|
[[ -n $password ]] || exit
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user