Skip to content

Commit d7772bc

Browse files
committed
Pass cmd mask to process buffer
1 parent 173f687 commit d7772bc

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

lua/neogit/buffers/process/init.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@ local M = {}
1010
M.__index = M
1111

1212
---@param process Process
13+
---@param mask_fn fun(string):string
1314
---@return ProcessBuffer
14-
function M:new(process)
15+
function M:new(process, mask_fn)
1516
local instance = {
16-
content = { string.format("> %s\r\n", table.concat(process.cmd, " ")) },
17+
content = { string.format("> %s\r\n", mask_fn(table.concat(process.cmd, " "))) },
1718
process = process,
1819
buffer = nil,
1920
truncated = false,

lua/neogit/process.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ function Process:spawn(cb)
387387
self.stdin = job
388388

389389
if not hide_console then
390-
self.buffer = ProcessBuffer:new(self)
390+
self.buffer = ProcessBuffer:new(self, mask_command)
391391
self:show_spinner()
392392
self:start_timer()
393393
end

0 commit comments

Comments
 (0)