Skip to content

Commit 16ea4c7

Browse files
committed
fix: Try TERM=xterm
1 parent 0eeb4e3 commit 16ea4c7

File tree

1 file changed

+4
-5
lines changed
  • crates/completest-pty/src

1 file changed

+4
-5
lines changed

crates/completest-pty/src/lib.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ PROMPT='%% '
115115
command.arg("--noglobalrcs");
116116
command
117117
.env("PATH", &self.path)
118-
.env("TERM", "dumb")
118+
.env("TERM", "xterm")
119119
.env("ZDOTDIR", &self.home);
120120
let echo = false;
121121
comptest(command, echo, input, term, self.timeout)
@@ -222,7 +222,7 @@ PS1='% '
222222
let inputrc_path = self.home.join(".inputrc");
223223
command
224224
.env("PATH", &self.path)
225-
.env("TERM", "dumb")
225+
.env("TERM", "xterm")
226226
.env("INPUTRC", &inputrc_path)
227227
.args([OsStr::new("--rcfile"), self.config.as_os_str()]);
228228
let echo = !input.contains("\t\t");
@@ -322,11 +322,10 @@ end;
322322
/// Get the output from typing `input` into the shell
323323
pub fn complete(&mut self, input: &str, term: &Term) -> std::io::Result<String> {
324324
let mut command = Command::new("fish");
325-
// fish requires TERM to be set.
326-
let env_term = std::env::var_os("TERM").unwrap_or_else(|| "dumb".into());
327325
command
328326
.env("PATH", &self.path)
329-
.env("TERM", &env_term)
327+
// fish requires TERM to be set.
328+
.env("TERM", "xterm")
330329
.env("XDG_CONFIG_HOME", &self.home);
331330
let echo = false;
332331
comptest(command, echo, input, term, self.timeout)

0 commit comments

Comments
 (0)