Kill the mutants of the child-shell reader and the streamed claude, and end a command at its last terminator
This commit is contained in:
@@ -78,10 +78,10 @@ def output_written(pid: int, started: float) -> float:
|
||||
|
||||
|
||||
def command_of(shell_argv: list[str]) -> str:
|
||||
"""What a shell runs: the text of its command line after Claude Code's `eval '`, up to the first ` < /dev/null`, which a call that began in the foreground lacks; the whole line where it holds no `eval`."""
|
||||
"""What a shell runs: the text of its command line after Claude Code's `eval '`, up to the last ` < /dev/null`, which a call that began in the foreground lacks; the whole line where it holds no `eval`."""
|
||||
line = " ".join(shell_argv)
|
||||
_, found, command = line.partition(" && eval ")
|
||||
return (command.split(" < /dev/null", 1)[0].removeprefix("'").removesuffix("'") if found else line)[:COMMAND_CHARS]
|
||||
return (command.rsplit(" < /dev/null", 1)[0].removeprefix("'").removesuffix("'") if found else line)[:COMMAND_CHARS]
|
||||
|
||||
|
||||
def holds_slot(pid: int, slots: pathlib.Path) -> bool:
|
||||
|
||||
Reference in New Issue
Block a user