* ttyio.c (tty_enable_completion, tty_disable_completion): Add checks

for no_terminal so we don't try to open("/dev/tty") when invoked with
--no-tty.
This commit is contained in:
David Shaw 2005-12-12 03:56:01 +00:00
parent 81f64252c0
commit b12d50dccd
2 changed files with 14 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2005-12-10 Ryan Lortie <desrt@desrt.ca> (dshaw)
* ttyio.c (tty_enable_completion, tty_disable_completion): Add
checks for no_terminal so we don't try to open("/dev/tty") when
invoked with --no-tty.
2005-12-06 David Shaw <dshaw@jabberwocky.com>
* Makefile.am: Some cleanup so we don't build files that are

View File

@ -179,8 +179,12 @@ init_ttyfp(void)
void
tty_enable_completion(rl_completion_func_t *completer)
{
if( no_terminal )
return;
if( !initialized )
init_ttyfp();
rl_attempted_completion_function=completer;
rl_inhibit_completion=0;
}
@ -188,8 +192,12 @@ tty_enable_completion(rl_completion_func_t *completer)
void
tty_disable_completion(void)
{
if( no_terminal )
return;
if( !initialized )
init_ttyfp();
rl_inhibit_completion=1;
}
#endif /*HAVE_LIBREADLINE*/