Added an help command to dump all options for completion
`bazel help completion` dump all options completion pattern
for each command, giving hints on the format of the completion
residue (e.g., `label`, `path`, `{a,enum}`, ...). This
dump can be used to generate completion scripts.
--
MOS_MIGRATED_REVID=90743024
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/Command.java b/src/main/java/com/google/devtools/build/lib/runtime/Command.java
index 1797cd3..318e3e4 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/Command.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/Command.java
@@ -105,4 +105,13 @@
*/
boolean canRunInOutputDirectory() default false;
+ /**
+ * Returns the type completion help for this command, that is the type arguments that this command
+ * expects. It can be a whitespace separated list if the command take several arguments. The type
+ * of each arguments can be <code>label</code>, <code>path</code>, <code>string</code>, ...
+ * It can also be a comma separated list of values, e.g. <code>{value1,value2}<code>. If a command
+ * accept several argument types, they can be combined with |, e.g <code>label|path</code>.
+ */
+ String completion() default "";
+
}