diff --git a/urjtag/ChangeLog b/urjtag/ChangeLog index d7ace6e7..8549864a 100644 --- a/urjtag/ChangeLog +++ b/urjtag/ChangeLog @@ -1,3 +1,7 @@ +2011-06-30 Mike Frysinger + + * cmd/cmd_initbus.c (cmd_initbus_complete): Complete bus parameters too. + 2011-06-30 Jie Zhang * src/cmd/Makefile.am (generated_cmd_list.h): Depend on diff --git a/urjtag/src/cmd/cmd_initbus.c b/urjtag/src/cmd/cmd_initbus.c index d7d405ee..1219852e 100644 --- a/urjtag/src/cmd/cmd_initbus.c +++ b/urjtag/src/cmd/cmd_initbus.c @@ -72,12 +72,19 @@ cmd_initbus_complete (urj_chain_t *chain, char ***matches, size_t *match_cnt, { size_t i; - if (token_point != 1) - return; - - for (i = 0; urj_bus_drivers[i]; i++) - urj_completion_mayben_add_match (matches, match_cnt, text, text_len, - urj_bus_drivers[i]->name); + switch (token_point) + { + case 1: + for (i = 0; urj_bus_drivers[i]; ++i) + urj_completion_mayben_add_match (matches, match_cnt, text, text_len, + urj_bus_drivers[i]->name); + break; + default: + for (i = 0; i < urj_bus_param_list.n; ++i) + urj_completion_mayben_add_match (matches, match_cnt, text, text_len, + urj_bus_param_list.list[i].string); + break; + } } const urj_cmd_t urj_cmd_initbus = {