From 55c4541fbae4197c97cfc4a10522fdf0d3bd9e25 Mon Sep 17 00:00:00 2001 From: "qy.tao" Date: Tue, 26 Dec 2023 14:08:25 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=9C=A8cmdOutputParser=20reset?= =?UTF-8?q?=E4=B9=8B=E5=89=8D=E8=8E=B7=E5=8F=96PS1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/proxy/parser.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/proxy/parser.go b/pkg/proxy/parser.go index 42786ceb9..5d24146dd 100644 --- a/pkg/proxy/parser.go +++ b/pkg/proxy/parser.go @@ -364,10 +364,10 @@ func (p *Parser) parseInputState(b []byte) []byte { p.inputState = true // 用户又开始输入,并上次不处于输入状态,开始结算上次命令的结果 if !p.inputPreState { - p.sendCommandRecord() if ps1 := p.cmdOutputParser.GetPs1(); ps1 != "" { p.cmdInputParser.SetPs1(ps1) } + p.sendCommandRecord() } } return b