@@ -24,10 +24,27 @@ pub static HEXDUMP_ITEM: menu::Item<Ctx> = menu::Item {
2424pub static RUN_ITEM : menu:: Item < Ctx > = menu:: Item {
2525 item_type : menu:: ItemType :: Callback {
2626 function : run,
27- parameters : & [ ] ,
27+ parameters : & [
28+ menu:: Parameter :: Optional {
29+ parameter_name : "arg1" ,
30+ help : None ,
31+ } ,
32+ menu:: Parameter :: Optional {
33+ parameter_name : "arg2" ,
34+ help : None ,
35+ } ,
36+ menu:: Parameter :: Optional {
37+ parameter_name : "arg3" ,
38+ help : None ,
39+ } ,
40+ menu:: Parameter :: Optional {
41+ parameter_name : "arg4" ,
42+ help : None ,
43+ } ,
44+ ] ,
2845 } ,
2946 command : "run" ,
30- help : Some ( "Jump to start of application area " ) ,
47+ help : Some ( "Run a program (with up to four arguments) " ) ,
3148} ;
3249
3350pub static LOAD_ITEM : menu:: Item < Ctx > = menu:: Item {
@@ -90,8 +107,8 @@ fn hexdump(_menu: &menu::Menu<Ctx>, _item: &menu::Item<Ctx>, args: &[&str], _ctx
90107}
91108
92109/// Called when the "run" command is executed.
93- fn run ( _menu : & menu:: Menu < Ctx > , _item : & menu:: Item < Ctx > , _args : & [ & str ] , ctx : & mut Ctx ) {
94- match ctx. tpa . execute ( ) {
110+ fn run ( _menu : & menu:: Menu < Ctx > , _item : & menu:: Item < Ctx > , args : & [ & str ] , ctx : & mut Ctx ) {
111+ match ctx. tpa . execute ( args ) {
95112 Ok ( 0 ) => {
96113 osprintln ! ( ) ;
97114 }
0 commit comments