File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -67,8 +67,8 @@ static commands: &'static [Command<'static>] = &[
67
67
usage_line: "build an executable, and run it",
68
68
usage_full: UsgStr(
69
69
"The run command is an shortcut for the command line \n\
70
- \"rustc <filename> -o <filestem>~ && ./<filestem>~\".\
71
- \n\nUsage:\trust run <filename>"
70
+ \"rustc <filename> -o <filestem>~ && ./<filestem>~ [<arguments>...] \".\
71
+ \n\nUsage:\trust run <filename> [<arguments>...] "
72
72
)
73
73
},
74
74
Command{
@@ -169,14 +169,14 @@ fn cmd_test(args: &[~str]) -> ValidUsage {
169
169
170
170
fn cmd_run(args: &[~str]) -> ValidUsage {
171
171
match args {
172
- [filename] => {
172
+ [filename, ..prog_args ] => {
173
173
let exec = Path(filename).filestem().unwrap() + "~";
174
174
if run::run_program("rustc", [
175
175
filename.to_owned(),
176
176
~"-o",
177
177
exec.to_owned()
178
178
]) == 0 {
179
- run::run_program(~"./"+exec, [] );
179
+ run::run_program(~"./"+exec, prog_args );
180
180
}
181
181
Valid
182
182
}
You can’t perform that action at this time.
0 commit comments