mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-01 13:01:21 -03:00
Use external mode for term when running key bindings
Prior to this fix, when key binding is a script command (i.e. not a readline command), fish would run that key binding using fish's shell tty modes. Switch to using the external tty modes. This re-fixes issue #2214.
This commit is contained in:
@@ -43,3 +43,31 @@ expect_prompt("has stopped")
|
||||
sendline("fg")
|
||||
sleep(0.1) # allow tty to transfer
|
||||
send("\x03") # control-c to cancel it
|
||||
|
||||
expect_prompt()
|
||||
sendline("jobs")
|
||||
expect_prompt("jobs: There are no jobs")
|
||||
|
||||
# Regression test for #2214: foregrounding from a key binding works!
|
||||
sendline(r"bind \cr 'fg >/dev/null 2>/dev/null'")
|
||||
expect_prompt()
|
||||
sendline("$fish_test_helper print_stop_cont");
|
||||
sleep(0.2)
|
||||
|
||||
send("\x1A") # ctrl-z
|
||||
expect_prompt("SIGTSTP")
|
||||
sleep(0.1)
|
||||
send("\x12") # ctrl-r, placing fth in foreground
|
||||
expect_str("SIGCONT")
|
||||
|
||||
# Do it again.
|
||||
send("\x1A")
|
||||
expect_str("SIGTSTP")
|
||||
sleep(0.1)
|
||||
send("\x12")
|
||||
expect_str("SIGCONT")
|
||||
|
||||
# End fth by sending it anything.
|
||||
send("\x12")
|
||||
sendline("derp")
|
||||
expect_prompt()
|
||||
|
||||
Reference in New Issue
Block a user