diff --git a/src/arg.rs b/src/arg.rs index 1fd8d5c..0fb3bab 100644 --- a/src/arg.rs +++ b/src/arg.rs @@ -38,6 +38,24 @@ pub fn get_args() -> ArgMatches<'static> { .value_names(&["OWNER", "REPO"]) .help("Fork a repository for a user") ) + .arg(Arg::with_name("draw") + .short("o") + .long("push") + .value_names(&["OWNER", "REPO", "BRANCH"]) + .help("Push local changes to a remote repository") + ) + .arg(Arg::with_name("pull") + .short("pl") + .long("pull") + .value_names(&["OWNER", "REPO", "BRANCH"]) + .help("Pull latest changes from a remote repository") + ) + .arg(Arg::with_name("clone") + .short("i") + .long("clone") + .value_names(&["OWNER", "REPO"]) + .help("Clone a repository") + ) ) .subcommand(SubCommand::with_name("issue") .about("Create, search, comment, close, or reopen an issue") diff --git a/src/main.rs b/src/main.rs index 5913350..4718910 100644 --- a/src/main.rs +++ b/src/main.rs @@ -45,6 +45,18 @@ fn main() { if repo_matches.is_present("list") { repo.list_repo(&request) } + + if repo_matches.is_present("push") { + repo.push_to_remote(&request) + } + + if repo_matches.is_present("pull") { + repo.pull_from_remote(&request) + } + + if repo_matches.is_present("clone") { + repo.clone_from_remote(&request, &config) + } } ("issue", Some(issue_matches)) => { let issue = issue::Issue::new();