Skip to content

Commit 09321f3

Browse files
authored
sekrets decrypt -a without username matches all account that contains (#22)
* decrypt -a without username matches all account that contains
1 parent 65c787c commit 09321f3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

docs/USAGE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ Sekrets provides a command-line interface (CLI) to securely encrypt files and st
66
## Encrypt a File
77
To encrypt a file:
88
```sh
9-
sekret encrypt -f secret.txt
9+
sekrets encrypt -f secret.txt
1010
```
1111
- The encrypted file is stored as sekrets.enc in the appropriate directory.
1212
- You will be prompted to enter a password for encryption.
1313

1414
## Decrypt Credentials
1515

1616
```sh
17-
sekret decrypt -a github
17+
sekrets decrypt -a github
1818
```
1919

2020
- You must enter the same password used for encryption
@@ -24,7 +24,7 @@ sekret decrypt -a github
2424

2525
To add new credentials to the encrypted file:
2626
```sh
27-
sekret append -a github -u myusername -p mypassword
27+
sekrets append -a github -u myusername -p mypassword
2828
```
2929

3030
- This securely appends new credentials to the existing encrypted file.

src/secrets/credential_manager.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ impl CredentialManager {
5252
.credentials
5353
.iter()
5454
.filter_map(|((acct, _), credential)| {
55-
if acct == &account {
55+
if acct.to_lowercase().contains(&account.to_lowercase()) {
5656
Some(credential.clone())
5757
} else {
5858
None

0 commit comments

Comments
 (0)