Message ID | 146342345578.22015.9381479390986560627.stgit@dwillia2-desk3.amr.corp.intel.com (mailing list archive) |
---|---|
State | Accepted |
Commit | e7c7a90057da |
Headers | show |
On Mon, May 16, 2016 at 11:30:55AM -0700, Dan Williams wrote: > Don't provide autocomplete help for unit test commands that are not > meant to be invoked in typical usage. > > Signed-off-by: Dan Williams <dan.j.williams@intel.com> Though I'll be hitting tab like a thousand times now and won't see test or bat, Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
diff --git a/ndctl.c b/ndctl.c index 6db1b2ffa0c0..bf0754cb454c 100644 --- a/ndctl.c +++ b/ndctl.c @@ -74,6 +74,14 @@ static int handle_options(const char ***argv, int *argc) for (i = 0; i < ARRAY_SIZE(commands); i++) { struct cmd_struct *p = commands+i; + + /* filter out commands from auto-complete */ + if (strcmp(p->cmd, "create-nfit") == 0) + continue; + if (strcmp(p->cmd, "test") == 0) + continue; + if (strcmp(p->cmd, "bat") == 0) + continue; printf("%s\n", p->cmd); } exit(0);
Don't provide autocomplete help for unit test commands that are not meant to be invoked in typical usage. Signed-off-by: Dan Williams <dan.j.williams@intel.com> --- ndctl.c | 8 ++++++++ 1 file changed, 8 insertions(+)