Make -l without argument list all accounts. - pee - Pee a password manager;Pee - because you have to...
(HTM) git clone git://vernunftzentrum.de/pee.git
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) LICENSE
---
(DIR) commit b1796046357c43e891ea45b50e9c4998d9a45060
(DIR) parent 9e3249cdf9945e4b36fb298f232bb590f17daf11
(HTM) Author: Christian Kellermann <ckeen@pestilenz.org>
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(-)
---
(DIR) 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))