Add more docs to structopt definitions

This makes the generated documentation a tad more explanatory.
This commit is contained in:
Martin Frost 2021-12-10 23:49:22 +01:00
parent c9603845d5
commit 2b2cdd54e5
4 changed files with 8 additions and 0 deletions

View File

@ -2,6 +2,8 @@ use git_mob::{parse_coauthors_file, write_coauthors_file, Author};
use structopt::StructOpt; use structopt::StructOpt;
#[derive(StructOpt, Debug)] #[derive(StructOpt, Debug)]
#[structopt(name="git-add-coauthor")]
/// Add a co-author to your git mob.
struct Opt { struct Opt {
/// Co-author initials /// Co-author initials
initials: String, initials: String,

View File

@ -2,6 +2,8 @@ use git_mob::{get_available_coauthors, write_coauthors_file};
use structopt::StructOpt; use structopt::StructOpt;
#[derive(StructOpt, Debug)] #[derive(StructOpt, Debug)]
#[structopt(name="git-delete-coauthor")]
/// Delete a co-author from your .git-coauthors file
struct Opt { struct Opt {
/// Initials of the co-author to delete /// Initials of the co-author to delete
initials: String, initials: String,

View File

@ -3,6 +3,8 @@ use std::process;
use structopt::StructOpt; use structopt::StructOpt;
#[derive(StructOpt, Debug)] #[derive(StructOpt, Debug)]
#[structopt(name="git-edit-coauthor")]
/// Edit a co-author in your .git-coauthors template
struct Opt { struct Opt {
/// Co-author initials /// Co-author initials
initials: String, initials: String,

View File

@ -7,6 +7,8 @@ use std::process;
use structopt::StructOpt; use structopt::StructOpt;
#[derive(StructOpt, Debug)] #[derive(StructOpt, Debug)]
#[structopt(name="git-mob")]
/// Assemble a group of co-authors to help you on your coding quest
struct Opt { struct Opt {
/// Prints list of available co-authors /// Prints list of available co-authors
#[structopt(short, long)] #[structopt(short, long)]