mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-07 10:01:14 -03:00
Work around wants_terminal not begin set inside eval
On this binding we fail to disable CSI u
bind c-t '
begin
set -lx FZF_DEFAULT_OPTS --height 40% --bind=ctrl-z:ignore
eval fzf | while read -l r; echo read $r; end
end
'
because for "fzf", ParseExecutionContext::setup_group() returns early with the
parent process group (which should be fish's own) , hence "wants_terminal"
is false. This seems questionable, I don't think the eval should make a
difference here.
For now, don't touch it; use the more accurate way of detecting whether
a process may read keyboard input. In many of such cases "wants_terminal"
is false, like
echo (echo 1\n2\n3 | fzf)
Fixes #10504
This commit is contained in:
@@ -192,7 +192,7 @@ expect_prompt("nonephemeral! line")
|
||||
sendline("true")
|
||||
expect_prompt()
|
||||
sendline("echo a; history search '*ephemeral!*' | cat; echo b")
|
||||
expect_prompt("a\r\necho nonephemeral! line\r\nb\r\n")
|
||||
expect_prompt(r"a\r\n.*echo nonephemeral! line\r\nb\r\n")
|
||||
|
||||
# If fish_should_add_to_history exists, it will completely take over,
|
||||
# so even lines with spaces are stored
|
||||
@@ -201,4 +201,4 @@ expect_prompt("spaced")
|
||||
sendline("true")
|
||||
expect_prompt()
|
||||
sendline("echo a; history search '*spaced*' | cat; echo b")
|
||||
expect_prompt("a\r\n echo spaced\r\nb\r\n")
|
||||
expect_prompt("a\r\n.* echo spaced\r\nb\r\n")
|
||||
|
||||
@@ -13,7 +13,7 @@ send, sendline, sleep, expect_prompt, expect_re, expect_str = (
|
||||
|
||||
|
||||
def expect_read_prompt():
|
||||
expect_re(r"\r\n?read> $")
|
||||
expect_re(r"\r\n?read> .*$")
|
||||
|
||||
|
||||
def expect_marker(text):
|
||||
|
||||
Reference in New Issue
Block a user