mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
* 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:
parent
81f64252c0
commit
b12d50dccd
2 changed files with 14 additions and 0 deletions
|
@ -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*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue