Skip to content

Commit ca62c0c

Browse files
committed
fix(bash-tool): properly shown bash command on permission prompt
This should fix #74
1 parent 28d6379 commit ca62c0c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lua/opencode/ui/session_formatter.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,8 +436,9 @@ function M._format_bash_tool(input, metadata)
436436
return
437437
end
438438

439-
if metadata.output then
440-
M._format_code(vim.split('> ' .. input.command or '' .. '\n\n' .. metadata.output, '\n'), 'bash')
439+
if metadata.output or metadata.command or input.command then
440+
local command = input.command or metadata.command or ''
441+
M._format_code(vim.split('> ' .. command .. '\n\n' .. (metadata.output or ''), '\n'), 'bash')
441442
end
442443
end
443444

0 commit comments

Comments
 (0)