add command completion to "print"

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1888 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Mike Frysinger 14 years ago
parent 61a695dafb
commit 5c503403e6

@ -1,3 +1,7 @@
2011-02-22 Mike Frysinger <vapier@gentoo.org>
* src/cmd/cmd_print.c: Add a completion handler.
2011-02-21 Mike Frysinger <vapier@gentoo.org>
* data/Makefile.am (nobase_dist_pkgdata_DATA): Add missing analog/bfin/bfin.

@ -280,9 +280,23 @@ cmd_print_help (void)
"print");
}
static void
cmd_print_complete (urj_chain_t *chain, char ***matches, size_t *match_cnt,
const char *text, size_t text_len, size_t token_point)
{
if (token_point != 1)
return;
urj_completion_mayben_add_match (matches, match_cnt, text, text_len, "chain");
urj_completion_mayben_add_match (matches, match_cnt, text, text_len, "bus");
urj_completion_mayben_add_match (matches, match_cnt, text, text_len, "signals");
urj_completion_mayben_add_match (matches, match_cnt, text, text_len, "instructions");
}
const urj_cmd_t urj_cmd_print = {
"print",
N_("display JTAG chain list/status"),
cmd_print_help,
cmd_print_run
cmd_print_run,
cmd_print_complete,
};

Loading…
Cancel
Save