Commit 4b4c5ca
net.client: fix tab completion on macOS (libedit parse_and_bind)
`unpythonic.net.client` issued
readline.parse_and_bind("tab: complete")
unconditionally. That's the GNU readline dialect. macOS ships
`readline` backed by `libedit` (not GNU readline), which speaks a
different `parse_and_bind` dialect — the GNU form is silently
ignored there, so macOS users of the REPL client have had no
working tab completion for some time.
Add a `platform.system() == "Darwin"` branch that issues
`readline.parse_and_bind("bind ^I rl_complete")` on macOS instead
— the libedit dialect that actually wires up tab completion.
Mirrors the pattern long-used in `raven.librarian.minichat`, and
newly added in the same session to `mcpyrate.repl.macropython`.
The `unpythonic.net` REPL subsystem remains documented as
POSIX-only (see 2.0.0 CHANGELOG — `ptyproxy` depends on
`termios`, unavailable on Windows). This commit does *not* make
the client Windows-capable; it just brings `net.client`'s
`parse_and_bind` into consistent shape with the rest of the
fleet, so that when we eventually do the Windows-compat work
for `unpythonic.net`, this one line is already correct. Also
promotes the previous `# TODO: do we need to call this, PyPy
doesn't support it?` comment to the same definitive form
`# PyPy ignores this, but not needed there.` used in mcpyrate.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 4f0f4a5 commit 4b4c5ca
2 files changed
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
171 | 172 | | |
172 | 173 | | |
173 | 174 | | |
174 | | - | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
175 | 183 | | |
176 | 184 | | |
177 | 185 | | |
| |||
0 commit comments