initbus: add support for completing bus parameters

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1942 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Mike Frysinger 14 years ago
parent ffe03785ef
commit 03ac12e292

@ -1,3 +1,7 @@
2011-06-30 Mike Frysinger <vapier@gentoo.org>
* cmd/cmd_initbus.c (cmd_initbus_complete): Complete bus parameters too.
2011-06-30 Jie Zhang <jie.zhang@analog.com>
* src/cmd/Makefile.am (generated_cmd_list.h): Depend on

@ -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 = {

Loading…
Cancel
Save