From: Eric Bollengier Date: Wed, 4 Jan 2023 14:27:03 +0000 (+0100) Subject: Fix #9786 About tab completion issue X-Git-Tag: Beta-15.0.0~293 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=033cde2f1afe293de8b7237edd66b63b96f9e88b;p=thirdparty%2Fbacula.git Fix #9786 About tab completion issue Issue introduced by "Improve .help to display information about dot-commands" --- diff --git a/bacula/src/dird/ua_dotcmds.c b/bacula/src/dird/ua_dotcmds.c index 59a8fa92f..6833137f0 100644 --- a/bacula/src/dird/ua_dotcmds.c +++ b/bacula/src/dird/ua_dotcmds.c @@ -43,6 +43,7 @@ extern int quit_cmd(UAContext *ua, const char *cmd); extern bool dot_status_cmd(UAContext *ua, const char *cmd); extern void bvfs_set_acl(UAContext *ua, Bvfs *bvfs); extern bool jlist_cmd(UAContext *ua, const char *cmd); +extern int qhelp_cmd(UAContext *ua, const char *cmd); /* Forward referenced functions */ static bool admin_cmds(UAContext *ua, const char *cmd); @@ -1751,7 +1752,16 @@ static bool dot_help_cmd(UAContext *ua, const char *cmd) int i; const char *msg=""; const char *kw = ua->argk[1]; + if (ua->argc == 2) { + /* Specific case for Tab completion */ + if (strcasecmp(ua->argk[1], NT_("item")) == 0) { + return qhelp_cmd(ua, cmd); + } + /* Specific case for Tab completion */ + if (strcasecmp(ua->argk[1], NT_("all")) == 0) { + return qhelp_cmd(ua, cmd); + } if (strcasecmp(ua->argk[0], NT_(".help")) == 0) { kw = ua->argk[1];