File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,11 @@ name="rust"
33cmd =" cargo run"
44quit_fast =false
55
6+ [[runners ]]
7+ name =" python"
8+ cmd =" python { file }"
9+ quit_fast =false
10+
611[[runners ]]
712name =" list"
813cmd =" ls"
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ impl Runner {
3939 }
4040 }
4141
42- /// Uses this runner to execute the run command
42+ /// Uses this runner to execute the its command
4343 pub fn run ( & self ) {
4444 let mut c = Command :: new ( "bash" ) ;
4545 c. arg ( "-c" ) ;
@@ -54,8 +54,9 @@ impl Runner {
5454 }
5555 }
5656
57+ /// process choose time arguments, and do corresponding string replacements
5758 pub fn get_args ( & mut self ) {
58- let re = Regex :: new ( r"\{(.*?)\}" ) . unwrap ( ) ;
59+ let re = Regex :: new ( r"\{\s* (.*?)\s* \}" ) . unwrap ( ) ;
5960 let handlebar_matches = re. find_iter ( & self . cmd ) ;
6061
6162 let keys: Vec < _ > = handlebar_matches. map ( |m| m. as_str ( ) ) . collect ( ) ;
You can’t perform that action at this time.
0 commit comments