Skip to content

Commit 097d76f

Browse files
committed
[supervisor] append history continuously
1 parent f28dbb4 commit 097d76f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

components/supervisor/pkg/supervisor/supervisor.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ func runTask(ctx context.Context, termMuxSrv *terminal.MuxTerminalService, task
414414
if !ok {
415415
log.Errorf("cannot obtain terminal for '%q'.", taskName)
416416
} else {
417-
term.PTY.Write([]byte(task + "; exit"))
417+
term.PTY.Write([]byte(task + "; exit\n"))
418418
}
419419
stdout := term.Stdout.ListenWithOptions(terminal.TermListenOptions{
420420
// ensure logging of entire task output

components/supervisor/pkg/terminal/service.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ func (srv *MuxTerminalService) OpenWithOptions(ctx context.Context, req *api.Ope
100100
if cmd.Dir == "" {
101101
cmd.Dir = srv.DefaultWorkdir
102102
}
103-
cmd.Env = append(srv.Env, "TERM=xterm-256color")
103+
cmd.Env = append(srv.Env, "TERM=xterm-256color", "PROMPT_COMMAND='history -a'")
104104
for key, value := range req.Env {
105105
cmd.Env = append(cmd.Env, fmt.Sprintf("%v=%v", key, value))
106106
}

0 commit comments

Comments
 (0)