Skip to content

Commit

Permalink
fix: 在cmdOutputParser reset之前获取PS1
Browse files Browse the repository at this point in the history
  • Loading branch information
triptao authored and LeeEirc committed Dec 27, 2023
1 parent 31d308a commit 55c4541
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/proxy/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 55c4541

Please sign in to comment.