Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
EricDriussi committed Apr 24, 2024
1 parent cf3ee36 commit f8b390d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
23 changes: 13 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Give credit to your teammates when pairing or mob-programming.

[co-author](https://github.com/EricDriussi/co-author/assets/46979145/0946f729-e970-4e23-afcf-008d4d05e6a8)
[co-author.webm](https://github.com/EricDriussi/co-author/assets/46979145/60994940-cfb1-4e73-a8e4-42b77ec132ee)

## Use Case

Expand Down Expand Up @@ -36,9 +36,10 @@ falling back to `$XDG_CONFIG_HOME/co-author/`, `$HOME/.config/co-author/`,
This file should follow the structure `alias,name,email`:

```csv
a,Name Surname,[email protected]
b,username,[email protected]
cd,Another Person,[email protected]
j,John Doe,[email protected]
aj,Alice Johnson,[email protected]
bb,Bob Brown,[email protected]
e,Erica Lee,[email protected]
```

If no options are passed, it will prompt you for a space-separated list of
Expand All @@ -50,8 +51,8 @@ It will produce a commit message with the following structure:
a commit message
Co-Authored-by: Name Surname <someone@users.noreply.github.com>
Co-Authored-by: username <something@gmail.com>
Co-Authored-by: John Doe <john@users.noreply.github.com>
Co-Authored-by: Erica Lee <erica@example.com>
```

If you group multiple users under the same alias, they will all be retrieved at once.
Expand All @@ -62,11 +63,11 @@ groups of people instead of individuals.
So for a file like:

```csv
a,Name Surname,someone@users.noreply.github.com
a,username,something@gmail.com
j,John Doe,john@users.noreply.github.com
j,Jane Smith,jane@example.com
```

When given the alias `a`, it will add **both users** as co-authors.
When given the alias `j`, it will add **both users** as co-authors.

## Options

Expand Down Expand Up @@ -163,6 +164,8 @@ Enables `--pre-populate` flag under the hood.
Presents a picker for the authors using your `fzf` install (and config).
Uses the `--multi` flag, so pressing `Tab` will select multiple authors.

Press enter when done do continue with the commit message.
Press enter when done to continue with the commit message.

[fzf.webm](https://github.com/EricDriussi/co-author/assets/46979145/62c9c4c1-2026-4323-837d-e87fded1cff3)

Conflicts with `--all` and `--list`.
1 change: 1 addition & 0 deletions src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@ pub struct Args {
/// Use fzf for author selection
#[arg(long, default_value = "false", conflicts_with("list"), conflicts_with("all"))]
pub fzf: bool,
// FIXME: if multiple authors have the same alias, selecting one with fzf will add them all as co-authors
}

0 comments on commit f8b390d

Please sign in to comment.