linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] trace-cmd show: Update help message for --hist and --trigger options
@ 2025-04-11 13:13 Steven Rostedt
  0 siblings, 0 replies; only message in thread
From: Steven Rostedt @ 2025-04-11 13:13 UTC (permalink / raw)
  To: Linux Trace Devel

From: "Steven Rostedt (Google)" <rostedt@goodmis.org>

The trace-cmd show help message was missing the --hist and --trigger
options. These are quite useful options and should be visible to the user
and not hidden as Easter eggs!

Also update the bash completion script to help out with the event list.

Fixes: 3e930655b ("trace-cmd show: Add --hist and --trigger options")
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 tracecmd/trace-cmd.bash | 4 ++++
 tracecmd/trace-usage.c  | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/tracecmd/trace-cmd.bash b/tracecmd/trace-cmd.bash
index 1bf4bc1b..c500ef0d 100644
--- a/tracecmd/trace-cmd.bash
+++ b/tracecmd/trace-cmd.bash
@@ -139,6 +139,10 @@ __trace_cmd_show_complete()
 	-B)
 	    show_instances "$cur"
 	    ;;
+	--hist|--trigger)
+	    local list=`list_events $cur`
+	    COMPREPLY=( $(compgen -W "all ${list}" -- "${cur}") )
+	    ;;
 	*)
 	    cmd_options show "$cur"
 	    ;;
diff --git a/tracecmd/trace-usage.c b/tracecmd/trace-usage.c
index 9884631d..3fd975c0 100644
--- a/tracecmd/trace-usage.c
+++ b/tracecmd/trace-usage.c
@@ -177,6 +177,8 @@ static struct usage_help usage_help[] = {
 		"          -f display the file path that is being dumped\n"
 		"          The following options shows the corresponding file name\n"
 		"           and then exits.\n"
+		"          --hist event (show the hist file of an event)\n"
+		"          --trigger event (show the trigger file of an event)\n"
 		"          --tracing_on\n"
 		"          --current_tracer\n"
 		"          --buffer_size (for buffer_size_kb)\n"
-- 
2.47.2


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2025-04-11 13:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-11 13:13 [PATCH] trace-cmd show: Update help message for --hist and --trigger options Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).