Skip to content

Commit 0cb6f85

Browse files
authored
fix: #143 UTF-8 backspace fix for macOS libedit (#144)
1 parent a9c7100 commit 0cb6f85

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

agents/s01_agent_loop.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,17 @@
2727
import os
2828
import subprocess
2929

30+
try:
31+
import readline
32+
# #143 UTF-8 backspace fix for macOS libedit
33+
readline.parse_and_bind('set bind-tty-special-chars off')
34+
readline.parse_and_bind('set input-meta on')
35+
readline.parse_and_bind('set output-meta on')
36+
readline.parse_and_bind('set convert-meta off')
37+
readline.parse_and_bind('set enable-meta-keybindings on')
38+
except ImportError:
39+
pass
40+
3041
from anthropic import Anthropic
3142
from dotenv import load_dotenv
3243

0 commit comments

Comments
 (0)