commit 77edb052477cfbd9b581aa710d393960b75c5ba9 parent 25d610c1495f5519f9434010fd962f3195c71371 Author: Cem Keylan <cem@ckyln.com> Date: Tue, 10 Mar 2020 23:26:11 +0300 simplify Diffstat:
M | contrib/pm-copy-dmenu | | | 8 | +------- |
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/contrib/pm-copy-dmenu b/contrib/pm-copy-dmenu @@ -1,10 +1,4 @@ #!/bin/sh -getpass() { - pm l | while read -r file ; do - basename "$file" | cut -d . -f 1 - done -} - -choice=$(getpass | dmenu -p "Choose the password that you would like to copy" -l 10) +choice=$(for file in $(pm l) ; do basename "$file" .asc ; done | dmenu -p "Choose the password that you would like to copy" -l 10) [ "$choice" ] && pm s "$choice" | xclip -sel c