Skip to content

Commit c9d7129

Browse files
committed
fish: set TERM if not set
1 parent bec20f8 commit c9d7129

File tree

1 file changed

+3
-0
lines changed
  • crates/completest-pty/src

1 file changed

+3
-0
lines changed

crates/completest-pty/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,11 @@ end;
319319
/// Get the output from typing `input` into the shell
320320
pub fn complete(&mut self, input: &str, term: &Term) -> std::io::Result<String> {
321321
let mut command = Command::new("fish");
322+
// fish requires TERM to be set.
323+
let env_term = std::env::var_os("TERM").unwrap_or_else(|| "dumb".into());
322324
command
323325
.env("PATH", &self.path)
326+
.env("TERM", &env_term)
324327
.env("XDG_CONFIG_HOME", &self.home);
325328
let echo = false;
326329
comptest(command, echo, input, term, self.timeout)

0 commit comments

Comments
 (0)