We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0e8c3ca commit d76141bCopy full SHA for d76141b
1 file changed
lua/opencode/ui/formatter.lua
@@ -560,9 +560,12 @@ end
560
---@param input GrepToolInput data for the tool
561
---@param metadata GrepToolMetadata Metadata for the tool use
562
function M._format_grep_tool(output, input, metadata)
563
- input = input or { path = '', include = '', pattern = '' }
564
-
565
- local grep_str = string.format('%s` `%s', (input.path or input.include) or '', input.pattern or '')
+ local grep_str = table.concat(
+ vim.tbl_filter(function(part)
+ return part ~= nil
566
+ end, { input.path or input.include, input.pattern }),
567
+ '` `'
568
+ )
569
570
M.format_action(output, icons.get('search') .. ' grep', grep_str)
571
if not config.ui.output.tools.show_output then
0 commit comments