Tools: Add bash completions for xkbcli
[platform/upstream/libxkbcommon.git] / tools / compile-keymap.c
index 6308449..f49aa3c 100644 (file)
@@ -58,6 +58,8 @@ usage(char **argv)
            "Compile the given RMLVO to a keymap and print it\n"
            "\n"
            "Options:\n"
+           " --help\n"
+           "    Print this help and exit\n"
            " --verbose\n"
            "    Enable verbose debugging output\n"
 #if ENABLE_PRIVATE_APIS
@@ -67,8 +69,10 @@ usage(char **argv)
            " --rmlvo\n"
            "    Print the full RMLVO with the defaults filled in for missing elements\n"
            " --from-xkb\n"
-           "    Load the XKB file from stdin, ignore RMLVO options. This option\n"
-           "    must not be used with --kccgst.\n"
+           "    Load the XKB file from stdin, ignore RMLVO options.\n"
+#if ENABLE_PRIVATE_APIS
+           "    This option must not be used with --kccgst.\n"
+#endif
            " --include\n"
            "    Add the given path to the include path list. This option is\n"
            "    order-dependent, include paths given first are searched first.\n"
@@ -320,7 +324,7 @@ main(int argc, char **argv)
     };
     int rc = 1;
 
-    if (argc <= 1) {
+    if (argc < 1) {
         usage(argv);
         return EXIT_INVALID_USAGE;
     }
@@ -351,7 +355,7 @@ main(int argc, char **argv)
 
     for (size_t i = 0; i < num_includes; i++) {
         const char *include = includes[i];
-        if (strcmp(include, DEFAULT_INCLUDE_PATH_PLACEHOLDER))
+        if (strcmp(include, DEFAULT_INCLUDE_PATH_PLACEHOLDER) == 0)
             xkb_context_include_path_append_default(ctx);
         else
             xkb_context_include_path_append(ctx, include);