Skip to content

Commit 05234f8

Browse files
committed
fix(cmd): exclude an empty command when updating exit code
1 parent 9c301b6 commit 05234f8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/shell/scripts/omp.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,9 @@ local function display_cached_prompt()
208208
end
209209

210210
local function command_executed_mark(input)
211-
no_exit_code = string.gsub(input, '^%s*(.-)%s*$', '%1') == ''
211+
if string.gsub(input, '^%s*(.-)%s*$', '%1') ~= '' then
212+
no_exit_code = false
213+
end
212214
if ftcs_marks_enabled then
213215
clink.print('\x1b]133;C\007', NONL)
214216
end

0 commit comments

Comments
 (0)