diff options
author | 2015-04-09 20:48:04 +0000 | |
---|---|---|
committer | 2015-04-10 08:02:30 +0000 | |
commit | 29728d4c37721aa88621a8578a7c2d7bfe8b5c68 (patch) | |
tree | b01b6032585956f1ce4312b54aab745fca2de59c /src/main/java/com/google/devtools/build/lib/runtime/Command.java | |
parent | 6379d2e4dc41bf32dfada75a001c39684083acd6 (diff) |
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
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/runtime/Command.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/runtime/Command.java | 9 |
1 files changed, 9 insertions, 0 deletions
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 1797cd3b46..318e3e419b 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 @@ public @interface Command { */ 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 ""; + } |