redefine command support completion

This commit is contained in:
hengyunabc
2019-02-07 21:21:53 +08:00
parent 79fe3a9382
commit a7ee25b1f2
@@ -13,6 +13,8 @@ import java.util.Map;
import org.objectweb.asm.ClassReader;
import com.taobao.arthas.core.command.Constants;
import com.taobao.arthas.core.shell.cli.Completion;
import com.taobao.arthas.core.shell.cli.CompletionUtils;
import com.taobao.arthas.core.shell.command.AnnotatedCommand;
import com.taobao.arthas.core.shell.command.CommandProcess;
import com.taobao.middleware.cli.annotations.Argument;
@@ -130,4 +132,11 @@ public class RedefineCommand extends AnnotatedCommand {
private static String readClassName(final byte[] bytes) {
return new ClassReader(bytes).getClassName().replace("/", ".");
}
@Override
public void complete(Completion completion) {
if (!CompletionUtils.completeFilePath(completion)) {
super.complete(completion);
}
}
}