fix: remove shell integration injection — echoes visibly in terminal
All checks were successful
Build & Sign Wraith / Build Windows + Sign (push) Successful in 1m1s
All checks were successful
Build & Sign Wraith / Build Windows + Sign (push) Successful in 1m1s
The CWD tracking PROMPT_COMMAND/precmd injection wrote raw escape sequences to stdin that echoed back to the user. Removed until we have a non-echoing mechanism (e.g., second SSH channel or .bashrc modification). CWD tracking still works passively for shells that already emit OSC 7 sequences. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
6729eb5b80
commit
c31563c8c6
BIN
images/2026-03-17 13_37_35-Wraith.png
Normal file
BIN
images/2026-03-17 13_37_35-Wraith.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 90 KiB |
@ -142,20 +142,10 @@ func (s *SSHService) Connect(hostname string, port int, username string, authMet
|
||||
// Launch goroutine to read stdout and forward data via the output handler
|
||||
go s.readLoop(sessionID, stdout)
|
||||
|
||||
// Inject shell integration for CWD tracking (OSC 7).
|
||||
// Send both bash and zsh variants — the wrong shell ignores them harmlessly.
|
||||
go func() {
|
||||
time.Sleep(500 * time.Millisecond)
|
||||
bashCmd := ShellIntegrationCommand("bash")
|
||||
zshCmd := ShellIntegrationCommand("zsh")
|
||||
if bashCmd != "" {
|
||||
// Write commands silently; errors are non-fatal
|
||||
_, _ = stdin.Write([]byte(bashCmd + "\n"))
|
||||
}
|
||||
if zshCmd != "" {
|
||||
_, _ = stdin.Write([]byte(zshCmd + "\n"))
|
||||
}
|
||||
}()
|
||||
// CWD tracking via OSC 7 is handled passively — the CWDTracker in readLoop
|
||||
// parses OSC 7 sequences if the remote shell already emits them. Automatic
|
||||
// PROMPT_COMMAND injection is deferred until we have a non-echoing mechanism
|
||||
// (e.g., writing to a second SSH channel or modifying .bashrc).
|
||||
|
||||
return sessionID, nil
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user