9p: session ctl: remove interrupt alias, drop / prefix for commands

stop is the only out-of-band signal. Everything else is forwarded
as a slash command (/ prepended automatically), so 'echo compact > ctl'
works directly.
This commit is contained in:
Levi Neely 2026-04-13 13:23:49 +02:00
parent 99e001f326
commit 3ff2454dcb
1 changed files with 3 additions and 5 deletions

View File

@ -877,13 +877,11 @@ func (s *Server) handleWrite(path, input string) {
sess.core.Queue(input)
case "ctl":
switch {
case input == "stop" || input == "interrupt":
switch input {
case "stop":
sess.core.Interrupt(agent.ErrInterrupted)
case strings.HasPrefix(input, "/"):
sess.core.Submit(sess.ctx, input, publish)
default:
fmt.Fprintf(os.Stderr, "olliesrv: session ctl: unknown command %q (use stop, interrupt, or /slashcmd)\n", input)
sess.core.Submit(sess.ctx, "/"+input, publish)
}
case "backend":