]> git.tuebingen.mpg.de Git - tfortune.git/blobdiff - tfortune.c
Fix --basedir completion.
[tfortune.git] / tfortune.c
index 0768976bfb83e8519aa29eab9ce40dfbb16a6413..e11c6da7556e7f2b613b1be7829bc3914b8d62a6 100644 (file)
@@ -930,11 +930,11 @@ static void show_subcommand_summary(bool verbose)
                for (i = 0; i < LSG_NUM_TFORTUNE_SUBCOMMANDS; i++) {
                        if (i > 0)
                                n += printf(", ");
-                       n += printf("%s", subcommand_names[i]);
                        if (n > 70) {
                                printf("\n\t");
                                n = 8;
                        }
+                       n += printf("%s", subcommand_names[i]);
                }
                printf("\n");
        }
@@ -1448,7 +1448,7 @@ static int com_compgen(void)
                        }
                        break;
                case WT_LONG_OPT_WITH_ARG:
-                       if (strcmp(prev, "--basename") == 0) {
+                       if (strcmp(prev, "--basedir") == 0) {
                                activate_dirname_completion();
                                return 1;
                        }