trace-cmd show: Update help message for --hist and --trigger options
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.
Link: https://lore.kernel.org/20250411091353.13f2a48a@gandalf.local.home
Fixes: 3e930655b ("trace-cmd show: Add --hist and --trigger options")
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
diff --git a/tracecmd/trace-cmd.bash b/tracecmd/trace-cmd.bash
index 6167bdb..82a3b91 100644
--- a/tracecmd/trace-cmd.bash
+++ b/tracecmd/trace-cmd.bash
@@ -145,6 +145,10 @@
-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 9884631..3fd975c 100644
--- a/tracecmd/trace-usage.c
+++ b/tracecmd/trace-usage.c
@@ -177,6 +177,8 @@
" -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"