@@ -113,7 +113,10 @@ PROMPT='%% '
113
113
pub fn complete ( & mut self , input : & str , term : & Term ) -> std:: io:: Result < String > {
114
114
let mut command = Command :: new ( "zsh" ) ;
115
115
command. arg ( "--noglobalrcs" ) ;
116
- command. env ( "PATH" , & self . path ) . env ( "ZDOTDIR" , & self . home ) ;
116
+ command
117
+ . env ( "PATH" , & self . path )
118
+ . env ( "TERM" , "xterm" )
119
+ . env ( "ZDOTDIR" , & self . home ) ;
117
120
let echo = false ;
118
121
comptest ( command, echo, input, term, self . timeout )
119
122
}
@@ -219,6 +222,7 @@ PS1='% '
219
222
let inputrc_path = self . home . join ( ".inputrc" ) ;
220
223
command
221
224
. env ( "PATH" , & self . path )
225
+ . env ( "TERM" , "xterm" )
222
226
. env ( "INPUTRC" , & inputrc_path)
223
227
. args ( [ OsStr :: new ( "--rcfile" ) , self . config . as_os_str ( ) ] ) ;
224
228
let echo = !input. contains ( "\t \t " ) ;
@@ -318,11 +322,10 @@ end;
318
322
/// Get the output from typing `input` into the shell
319
323
pub fn complete ( & mut self , input : & str , term : & Term ) -> std:: io:: Result < String > {
320
324
let mut command = Command :: new ( "fish" ) ;
321
- // fish requires TERM to be set.
322
- let env_term = std:: env:: var_os ( "TERM" ) . unwrap_or_else ( || "dumb" . into ( ) ) ;
323
325
command
324
326
. env ( "PATH" , & self . path )
325
- . env ( "TERM" , & env_term)
327
+ // fish requires TERM to be set.
328
+ . env ( "TERM" , "xterm" )
326
329
. env ( "XDG_CONFIG_HOME" , & self . home ) ;
327
330
let echo = false ;
328
331
comptest ( command, echo, input, term, self . timeout )
0 commit comments