From ed38c6a5784b0ea523e23a36050244230410ff2f Mon Sep 17 00:00:00 2001 From: hengyunabc Date: Wed, 8 Apr 2020 11:32:45 +0800 Subject: [PATCH] update doc --- .../arthas/core/command/basic1000/EchoCommand.java | 4 ++++ .../core/command/monitor200/PerfCounterCommand.java | 5 ++++- site/src/site/sphinx/advanced-use.md | 1 + site/src/site/sphinx/commands.md | 1 + site/src/site/sphinx/echo.md | 9 +++++++++ site/src/site/sphinx/en/advanced-use.md | 1 + site/src/site/sphinx/en/commands.md | 1 + site/src/site/sphinx/en/echo.md | 9 +++++++++ 8 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 site/src/site/sphinx/echo.md create mode 100644 site/src/site/sphinx/en/echo.md diff --git a/core/src/main/java/com/taobao/arthas/core/command/basic1000/EchoCommand.java b/core/src/main/java/com/taobao/arthas/core/command/basic1000/EchoCommand.java index ca3f335d3..89cc62f46 100644 --- a/core/src/main/java/com/taobao/arthas/core/command/basic1000/EchoCommand.java +++ b/core/src/main/java/com/taobao/arthas/core/command/basic1000/EchoCommand.java @@ -1,5 +1,6 @@ package com.taobao.arthas.core.command.basic1000; +import com.taobao.arthas.core.command.Constants; import com.taobao.arthas.core.shell.command.AnnotatedCommand; import com.taobao.arthas.core.shell.command.CommandProcess; import com.taobao.middleware.cli.annotations.Argument; @@ -14,6 +15,9 @@ import com.taobao.middleware.cli.annotations.Summary; */ @Name("echo") @Summary("write arguments to the standard output") +@Description("\nExamples:\n" + + " echo 'abc'\n" + + Constants.WIKI + Constants.WIKI_HOME + "echo") public class EchoCommand extends AnnotatedCommand { private String message; diff --git a/core/src/main/java/com/taobao/arthas/core/command/monitor200/PerfCounterCommand.java b/core/src/main/java/com/taobao/arthas/core/command/monitor200/PerfCounterCommand.java index d0eb9ae29..a388a7dba 100644 --- a/core/src/main/java/com/taobao/arthas/core/command/monitor200/PerfCounterCommand.java +++ b/core/src/main/java/com/taobao/arthas/core/command/monitor200/PerfCounterCommand.java @@ -32,7 +32,10 @@ import sun.management.counter.perf.PerfInstrumentation; */ @Name("perfcounter") @Summary("Display the perf counter infornation.") -@Description(Constants.WIKI + Constants.WIKI_HOME + "perf") +@Description("\nExamples:\n" + + " perfcounter\n" + + " perfcounter -d\n" + + Constants.WIKI + Constants.WIKI_HOME + "perfcounter") public class PerfCounterCommand extends AnnotatedCommand { private static final Logger logger = LoggerFactory.getLogger(PerfCounterCommand.class); private static Object perfObject; diff --git a/site/src/site/sphinx/advanced-use.md b/site/src/site/sphinx/advanced-use.md index b4dac0ff1..e671b2caa 100644 --- a/site/src/site/sphinx/advanced-use.md +++ b/site/src/site/sphinx/advanced-use.md @@ -6,6 +6,7 @@ * help——查看命令帮助信息 * [cat](cat.md)——打印文件内容,和linux里的cat命令类似 +* [echo](echo.md)--打印参数,和linux里的echo命令类似 * [grep](grep.md)——匹配查找,和linux里的grep命令类似 * [tee](tee.md)——复制标准输入到标准输出和指定的文件,和linux里的tee命令类似 * [pwd](pwd.md)——返回当前的工作目录,和linux命令类似 diff --git a/site/src/site/sphinx/commands.md b/site/src/site/sphinx/commands.md index 365de44a0..a48066d8a 100644 --- a/site/src/site/sphinx/commands.md +++ b/site/src/site/sphinx/commands.md @@ -33,6 +33,7 @@ * [profiler](profiler.md) * [cat](cat.md) +* [echo](echo.md) * [grep](grep.md) * [tee](tee.md) * [pwd](pwd.md) diff --git a/site/src/site/sphinx/echo.md b/site/src/site/sphinx/echo.md new file mode 100644 index 000000000..39ace94e0 --- /dev/null +++ b/site/src/site/sphinx/echo.md @@ -0,0 +1,9 @@ +echo +=== + +> 打印参数,和linux里的echo命令类似。 + + +```bash +$ echo 'hello' +``` \ No newline at end of file diff --git a/site/src/site/sphinx/en/advanced-use.md b/site/src/site/sphinx/en/advanced-use.md index a5c1fbf4b..6c758f674 100644 --- a/site/src/site/sphinx/en/advanced-use.md +++ b/site/src/site/sphinx/en/advanced-use.md @@ -6,6 +6,7 @@ Advanced Usage * help - display Arthas help * cls - clear the screen * [cat](cat.md) - Concatenate and print files +* [echo](echo.md) - write arguments to the standard output * [grep](grep.md) - Pattern searcher * [tee](tee.md) - Copies standard input to standard output, making a copy in zero or more files. * [pwd](pwd.md) - Return working directory name diff --git a/site/src/site/sphinx/en/commands.md b/site/src/site/sphinx/en/commands.md index f3c689d46..3a3b1060a 100644 --- a/site/src/site/sphinx/en/commands.md +++ b/site/src/site/sphinx/en/commands.md @@ -33,6 +33,7 @@ All Commands * [profiler](profiler.md) * [cat](cat.md) +* [echo](echo.md) * [grep](grep.md) * [tee](tee.md) * [pwd](pwd.md) diff --git a/site/src/site/sphinx/en/echo.md b/site/src/site/sphinx/en/echo.md new file mode 100644 index 000000000..0490186f2 --- /dev/null +++ b/site/src/site/sphinx/en/echo.md @@ -0,0 +1,9 @@ +echo +=== + +> write arguments to the standard output. + + +```bash +$ echo 'hello' +``` \ No newline at end of file