Implement completion for legacy provider

Fixes #149
This commit is contained in:
Eric Bottard
2017-09-07 17:34:56 +02:00
parent 6f872dc308
commit c8ab5f1698
5 changed files with 222 additions and 51 deletions

View File

@@ -16,6 +16,7 @@
package org.springframework.shell.samples.legacy;
import java.io.File;
import java.lang.reflect.Method;
import org.springframework.shell.core.CommandMarker;
@@ -91,4 +92,8 @@ public class LegacyCommands implements CommandMarker {
return message;
}
@CliCommand(value = "legacy-file", help = "Uses a legacy converter for completion")
public String legacyFile(@CliOption(key = "file") File file, @CliOption(key = "flag") boolean flag) {
return file + " exists? : " + file.exists();
}
}