mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-22 08:41:13 +08:00
Disable terminal protocols before expanding wildcards
Commit 29f2da8d1
(Toggle terminal protocols lazily, 2024-05-16) made it so
the wildcard expansion in "echo **" (in a large directory tree) can't be
canceled with ctrl-c. Fix this by disabling terminal protocols already at
expansion time (not waiting until execution).
This commit is contained in:
parent
3be588569d
commit
d21ed0fb22
|
@ -448,7 +448,9 @@ mod expander {
|
|||
|
||||
use crate::{
|
||||
common::scoped_push,
|
||||
input_common::terminal_protocols_disable_ifn,
|
||||
path::append_path_component,
|
||||
threads::is_main_thread,
|
||||
wutil::{dir_iter::DirIter, normalize_path, DevInode},
|
||||
};
|
||||
|
||||
|
@ -592,6 +594,10 @@ mod expander {
|
|||
}
|
||||
}
|
||||
|
||||
if is_main_thread() {
|
||||
terminal_protocols_disable_ifn();
|
||||
}
|
||||
|
||||
// return "." and ".." entries if we're doing completions
|
||||
let Ok(mut dir) = self.open_dir(
|
||||
base_dir, /* return . and .. */
|
||||
|
|
Loading…
Reference in New Issue
Block a user