diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-10-26 18:35:11 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2021-10-26 18:35:11 +0300 |
commit | 5e70835656c88d2a843edd10bfa62b442683f5a9 (patch) | |
tree | b0366a47221c30d239543a37b7200e8312e98c98 /clab.md | |
parent | acae9764fd617a57858cde5c764df2b98d3a0179 (diff) | |
download | clab-5e70835656c88d2a843edd10bfa62b442683f5a9.tar.gz |
feat: add a "clab reformat" command
Sponsored-by: author
Diffstat (limited to 'clab.md')
-rw-r--r-- | clab.md | 30 |
1 files changed, 30 insertions, 0 deletions
@@ -1,3 +1,4 @@ + --- title: "clab; – command line address book" author: Lars Wirzenius @@ -75,6 +76,20 @@ then stdout is exactly "clab found matches:\nalice@example.com\tAlice Atherthon\ last_checked: 2021-09 ~~~ +~~~{#address-book-reformatted .file .yaml} +--- +- name: Alice Atherthon + email: + work: alice@example.com + tags: + - co-worker + last_checked: 2021-09 +- name: Bob Bobbington + email: + personal: bob@example.com + last_checked: 2021-09 +~~~ + # Search by tag @@ -108,3 +123,18 @@ then command is successful then stdout contains "Alice Atherthon" then stdout contains "Bob" ~~~ + +# Reformat address book + +This scenario verifies that `clab` can reformat the address book in +place. + +~~~scenario +given an installed clab +given file .local/share/clab/address-book.yaml from address-book.yaml +given file reformatted.yaml from address-book-reformatted + +when I run clab reformat +then command is successful +then files .local/share/clab/address-book.yaml and reformatted.yaml match +~~~ |