linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Linux Trace Devel <linux-trace-devel@vger.kernel.org>
Subject: [PATCH] trace-cmd completion: Fix trace-cmd report to show files
Date: Wed, 16 Apr 2025 20:12:49 -0400	[thread overview]
Message-ID: <20250416201249.195f3e86@gandalf.local.home> (raw)

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

The addition of the trace-cmd sqlhist had to separate out where commands
are printed and where files are printed, and it split cmd_options into one
that showed the commands and cmd_options_files that also will show the
files if no command was found to be completed.

Some trace-cmd commands should show files and some should not.

trace-cmd report is one that should show files if nothing else is
completed, but it was given cmd_options when it should have used
cmd_options_files.

Fixes: 2149da9cdc48b ("trace-cmd: Add sqlhist to bash completion")
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 tracecmd/trace-cmd.bash | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tracecmd/trace-cmd.bash b/tracecmd/trace-cmd.bash
index 82a3b91dfd02..a7e81e0ded4a 100644
--- a/tracecmd/trace-cmd.bash
+++ b/tracecmd/trace-cmd.bash
@@ -237,7 +237,7 @@ __trace_cmd_report_complete()
 	    plugin_options "$cur"
 	    ;;
         *)
-	    cmd_options report "$cur"
+	    cmd_options_files report "$cur"
 	    ;;
     esac
 }
-- 
2.47.2


             reply	other threads:[~2025-04-17  0:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-17  0:12 Steven Rostedt [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-05-30 19:45 [PATCH] trace-cmd completion: Fix trace-cmd report to show files Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250416201249.195f3e86@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=linux-trace-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).