Skip to content

Commit

Permalink
0.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
mckernant1 committed Aug 28, 2019
1 parent 315de3e commit e8905f1
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pm"
version = "0.2.0"
version = "0.2.1"
authors = ["Tom McKernan <tmeaglei@gmail.com>"]
edition = "2018"

Expand Down
6 changes: 3 additions & 3 deletions src/cli.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Project Manager
version: 0.2.0
version: 0.2.1
author: Tom McKernan <tmeaglei@gmail.com>
about: A global git manager
about: A project manager for your computer
subcommands:
- clone:
about: Clone repository to default directory
Expand Down Expand Up @@ -41,7 +41,7 @@ subcommands:
required: true
help: The name of the project to delete
- cmd:
about: runs given shell script in project directory. If command doesnt exists you will be prompted for it.
about: runs given shell script in project directory. If command doesn't exist you will be prompted for it.
args:
- PROJ_NAME:
required: true
Expand Down
2 changes: 1 addition & 1 deletion src/setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ impl SettingsFile {
if repo["name"] != new_repo["name"] {
new_repos.push(repo.clone()).unwrap();
} else {
new_repos.push(new_repo.clone());
new_repos.push(new_repo.clone()).unwrap();
}
}

Expand Down
8 changes: 3 additions & 5 deletions src/subcommands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,10 @@ pub fn cmd(matches: ArgMatches, settings_file: SettingsFile) {

let cmd_to_run = repo_json["cmds"][cmd_name].clone().to_string();

println!("Executing: '{}' in '{}'", cmd_to_run, repo_json["path"].as_str().unwrap());

if cmd_to_run == "null".to_string() {
create_new_cmd(settings_file, cmd_name, repo_json.clone());
} else {
println!("Executing: '{}' in '{}'", cmd_to_run, repo_json["path"].as_str().unwrap());
let cmd_split: Vec<&str> = cmd_to_run
.split(" ")
.collect::<Vec<&str>>();
Expand All @@ -164,9 +163,8 @@ pub fn cmds(matches: ArgMatches, settings_file: SettingsFile) {

let repo_json = settings_file.get_repo_by_name(repo_name);
let title_string = format!("Commands for {}", repo_json["name"].as_str().unwrap());
println!("{}\n{}", title_string.to_uppercase(), (|| {
"#".repeat(title_string.len())
})());
println!("{}\n{}", title_string.to_uppercase(),
"#".repeat(title_string.len()));

for member in repo_json["cmds"].entries() {
let (name, cmd) = member;
Expand Down

0 comments on commit e8905f1

Please sign in to comment.