Set default value for the express argument of the watch command (#1122)

This commit is contained in:
qxo 2020-04-22 11:09:54 +08:00 committed by GitHub
parent 6b26a09a60
commit 9689968568
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,6 +10,7 @@ import com.taobao.arthas.core.shell.command.CommandProcess;
import com.taobao.arthas.core.util.SearchUtils;
import com.taobao.arthas.core.util.matcher.Matcher;
import com.taobao.middleware.cli.annotations.Argument;
import com.taobao.middleware.cli.annotations.DefaultValue;
import com.taobao.middleware.cli.annotations.Description;
import com.taobao.middleware.cli.annotations.Name;
import com.taobao.middleware.cli.annotations.Option;
@ -54,7 +55,8 @@ public class WatchCommand extends EnhancerCommand {
this.methodPattern = methodPattern;
}
@Argument(index = 2, argName = "express")
@Argument(index = 2, argName = "express", required = false)
@DefaultValue("{params, target, returnObj}")
@Description("the content you want to watch, written by ognl.\n" + Constants.EXPRESS_EXAMPLES)
public void setExpress(String express) {
this.express = express;