gitpush 0.0.3

A tool to run git push easily
Documentation
1
2
3
4
5
6
7
8
9
// use std::error::Error;
use regex::Regex;

/// find `git push xxx` command to execute
pub fn find_gitpush_command<'a>(content: &'a str) -> Option<&'a str> {
    let re = Regex::new(r"git push[^\n]+").expect("Failed to create regular expression.");
    let ma = re.find(content)?;
    Some(ma.as_str())
}