add command completion to "debug"

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

@ -2,6 +2,8 @@
* src/cmd/cmd_print.c: Add a completion handler.
* src/cmd/cmd_debug.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.

@ -131,9 +131,27 @@ cmd_debug_help (void)
"debug");
}
static void
cmd_debug_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, "all");
urj_completion_mayben_add_match (matches, match_cnt, text, text_len, "comm");
urj_completion_mayben_add_match (matches, match_cnt, text, text_len, "debug");
urj_completion_mayben_add_match (matches, match_cnt, text, text_len, "detail");
urj_completion_mayben_add_match (matches, match_cnt, text, text_len, "normal");
urj_completion_mayben_add_match (matches, match_cnt, text, text_len, "warning");
urj_completion_mayben_add_match (matches, match_cnt, text, text_len, "error");
urj_completion_mayben_add_match (matches, match_cnt, text, text_len, "silent");
}
const urj_cmd_t urj_cmd_debug = {
"debug",
N_("set logging/debugging level"),
cmd_debug_help,
cmd_debug_run
cmd_debug_run,
cmd_debug_complete,
};

Loading…
Cancel
Save