From d1208386d21e4e85fa99538fef0bf23475a3c3e1 Mon Sep 17 00:00:00 2001 From: Kurtis Rader Date: Tue, 24 May 2016 20:42:50 -0700 Subject: tty driver ignore lnext (\cV) and werase (\cW) Configure the tty driver to ignore the lnext (\cV) and werase (\cW) characters so they can be bound to fish functions. Correct the `fish_key_bindings` program to initialize the tty in the same manner as the `fish` program. Fixes #3064 --- tests/bind.expect | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'tests/bind.expect') diff --git a/tests/bind.expect b/tests/bind.expect index 7589fa8e..7c594241 100644 --- a/tests/bind.expect +++ b/tests/bind.expect @@ -199,3 +199,23 @@ expect_prompt -re {\r\nmno pqrt\r\n} { } unmatched { puts stderr "emacs transpose words fail, 100ms timeout: long delay" } + +# Verify special characters, such as \cV, are not intercepted by the kernel +# tty driver. Rather, they can be bound and handled by fish. +send "bind \\cV 'echo ctrl-v seen'\r" +expect_prompt +send "\026\r" +expect_prompt -re {ctrl-v seen} { + puts "ctrl-v seen" +} unmatched { + puts stderr "ctrl-v not seen" +} + +send "bind \\cO 'echo ctrl-o seen'\r" +expect_prompt +send "\017\r" +expect_prompt -re {ctrl-o seen} { + puts "ctrl-o seen" +} unmatched { + puts stderr "ctrl-o not seen" +} -- cgit v1.2.3