Skip to content

Commit a2d19bb

Browse files
authored
Merge pull request #146 from hexmode/fix-readline-escapes
Send raw strings to readline.parse_and_bind
2 parents d757260 + a304b6d commit a2d19bb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

npcsh/shell_helpers.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -573,11 +573,11 @@ def setup_readline() -> str:
573573

574574
readline.set_history_length(1000)
575575
readline.parse_and_bind("set enable-bracketed-paste on") # Enable paste mode
576-
readline.parse_and_bind('"\e[A": history-search-backward')
577-
readline.parse_and_bind('"\e[B": history-search-forward')
578-
readline.parse_and_bind('"\C-r": reverse-search-history')
579-
readline.parse_and_bind("\C-e: end-of-line")
580-
readline.parse_and_bind("\C-a: beginning-of-line")
576+
readline.parse_and_bind(r'"\e[A": history-search-backward')
577+
readline.parse_and_bind(r'"\e[B": history-search-forward')
578+
readline.parse_and_bind(r'"\C-r": reverse-search-history')
579+
readline.parse_and_bind(r'\C-e: end-of-line')
580+
readline.parse_and_bind(r'\C-a: beginning-of-line')
581581

582582
return history_file
583583

0 commit comments

Comments
 (0)