Skip to content

Commit e3adafc

Browse files
committed
fix(session_formatter): no backstick spaces, pluralize match
1 parent 936f332 commit e3adafc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lua/opencode/ui/session_formatter.lua

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -517,14 +517,16 @@ end
517517
function M._format_grep_tool(input, metadata)
518518
input = input or { path = '', include = '', pattern = '' }
519519

520-
local grep_str = string.format('%s `` %s', (input.path or input.include) or '', input.pattern or '')
520+
local grep_str = string.format('%s` `%s', (input.path or input.include) or '', input.pattern or '')
521521

522522
M._format_action(icons.get('search') .. ' grep', grep_str)
523523
if not config.ui.output.tools.show_output then
524524
return
525525
end
526526
local prefix = metadata.truncated and ' more than' or ''
527-
M.output:add_line(string.format('Found%s `%d` match', prefix, metadata.matches or 0))
527+
M.output:add_line(
528+
string.format('Found%s `%d` match' .. (metadata.matches ~= 1 and 'es' or ''), prefix, metadata.matches or 0)
529+
)
528530
end
529531

530532
---@param input WebFetchToolInput data for the tool

0 commit comments

Comments
 (0)