Files
fish-shell/tests/pexpects/tty_ownership.py
Johannes Altmanninger 7e3fac561d Query terminal only just before reading from it
Commit 5e317497ef (Query terminal before reading config, 2025-05-17)
disabled the kitty keyboard protocol in "fish -c read".  This seems
surprising, and it's not actually necessary that we query before
reading config; we only need query results before we read from
the TTY for the first time (which is about the time we call
__fish_config_interactive). Let's do that, reverting parts of
5e317497ef.
2025-09-26 12:59:02 +02:00

36 lines
832 B
Python

#!/usr/bin/env python3
from pexpect_helper import SpawnedProc
sp = SpawnedProc()
sendline, expect_prompt = sp.sendline, sp.expect_prompt
expect_prompt()
sendline("status job-control full")
expect_prompt()
sendline(
"$fish -c 'status job-control full ; $fish_test_helper report_foreground' &; wait"
)
expect_prompt()
sendline("echo it worked")
expect_prompt("it worked")
# Regression test for #9181
sendline("status job-control interactive")
expect_prompt()
sendline("$fish_test_helper abandon_tty")
expect_prompt()
sendline("echo cool")
expect_prompt("cool")
sendline("true ($fish_test_helper abandon_tty)")
expect_prompt()
sendline("echo even cooler")
expect_prompt("even cooler")
sendline("TERM=not-dumb $fish -c read")
sp.send_primary_device_attribute()
sendline("something")
sp.expect_re(r"\x1b\[\?u")
expect_prompt()