-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
92 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
.PHONY: test build run check echo-test build-release echo-greeting cmd | ||
|
||
include test.mk | ||
|
||
echo-test: | ||
@echo good | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,6 @@ | ||
use skim::prelude::Skim; | ||
use std::process; | ||
|
||
mod misc; | ||
|
||
fn main() { | ||
let (options, items) = misc::get_params(); | ||
if let output @ Some(_) = Skim::run_with(&options, items) { | ||
if output.as_ref().unwrap().is_abort { | ||
process::exit(0) | ||
} | ||
|
||
let selected_items = output | ||
.map(|out| out.selected_items) | ||
.unwrap_or_else(Vec::new); | ||
|
||
for item in selected_items.iter() { | ||
println!("make {}", item.output().to_string()); | ||
process::Command::new("make") | ||
.stdin(process::Stdio::inherit()) | ||
.arg(item.output().to_string()) | ||
.spawn() | ||
.expect("Failed to execute process") | ||
.wait() | ||
.expect("Failed to execute process"); | ||
} | ||
} | ||
// TODO: catch panic | ||
misc::run(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
.PHONY: echo-mk | ||
echo-mk: | ||
@echo "mk" | ||
.PHONY: echo-test2 | ||
echo-test2: | ||
@echo "test2" | ||
|