]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Fix #9786 About tab completion issue
authorEric Bollengier <eric@baculasystems.com>
Wed, 4 Jan 2023 14:27:03 +0000 (15:27 +0100)
committerEric Bollengier <eric@baculasystems.com>
Thu, 14 Sep 2023 11:57:00 +0000 (13:57 +0200)
Issue introduced by "Improve .help to display information about dot-commands"

bacula/src/dird/ua_dotcmds.c

index 59a8fa92f4d593a34ad539c7c0dac4c422754192..6833137f0e8f9edcda6b7c6aa5388d7163af6673 100644 (file)
@@ -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];