Make -l without argument list all accounts. - pee - Pee a password manager;Pee … | |
git clone git://vernunftzentrum.de/pee.git | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit b1796046357c43e891ea45b50e9c4998d9a45060 | |
parent 9e3249cdf9945e4b36fb298f232bb590f17daf11 | |
Author: Christian Kellermann <[email protected]> | |
Date: Wed, 20 Apr 2016 15:21:29 +0200 | |
Make -l without argument list all accounts. | |
Diffstat: | |
pee.scm | 7 +++++-- | |
1 file changed, 5 insertions(+), 2 deletions(-) | |
--- | |
diff --git a/pee.scm b/pee.scm | |
@@ -232,7 +232,7 @@ | |
(list | |
"Shows all info for an entry. Does not show the password." | |
(required #f) | |
- (value (required ACCOUNT) | |
+ (value (optional ACCOUNT) | |
(predicate ,string?)) | |
(single-char #\l)) | |
(change-passphrase | |
@@ -311,7 +311,10 @@ | |
(exit 1)))) | |
(define (do-list db account) | |
- (let* ((regex (string->irregex (string-append ".*" account ".*") 'i 'utf8)) | |
+ (let* ((regex (string->irregex (if (string? account) | |
+ (string-append ".*" account ".*") | |
+ ".*") | |
+ 'i 'utf8)) | |
(accounts | |
(filter (lambda (k) | |
(irregex-match regex k)) |