mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
* ttyio.c (tty_enable_completion, tty_disable_completion): Enable and
disable readline completion. (init_ttyfp): Completion is disabled by default.
This commit is contained in:
parent
5f7720e693
commit
9c3484924b
4 changed files with 47 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
2005-03-18 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* ttyio.c (tty_enable_completion, tty_disable_completion): Enable
|
||||
and disable readline completion.
|
||||
(init_ttyfp): Completion is disabled by default.
|
||||
|
||||
2005-03-14 Werner Koch <wk@g10code.com>
|
||||
|
||||
* miscutil.c (isotimestamp): New.
|
||||
|
|
20
util/ttyio.c
20
util/ttyio.c
|
@ -165,6 +165,7 @@ init_ttyfp(void)
|
|||
#ifdef HAVE_LIBREADLINE
|
||||
rl_catch_signals = 0;
|
||||
rl_instream = rl_outstream = ttyfp;
|
||||
rl_inhibit_completion = 1;
|
||||
#endif
|
||||
#endif
|
||||
#ifdef HAVE_TCGETATTR
|
||||
|
@ -173,6 +174,25 @@ init_ttyfp(void)
|
|||
initialized = 1;
|
||||
}
|
||||
|
||||
#ifdef HAVE_LIBREADLINE
|
||||
void
|
||||
tty_enable_completion(rl_completion_func_t *completer)
|
||||
{
|
||||
if( !initialized )
|
||||
init_ttyfp();
|
||||
rl_attempted_completion_function=completer;
|
||||
rl_inhibit_completion=0;
|
||||
}
|
||||
|
||||
void
|
||||
tty_disable_completion(void)
|
||||
{
|
||||
if( !initialized )
|
||||
init_ttyfp();
|
||||
rl_inhibit_completion=1;
|
||||
}
|
||||
#endif
|
||||
|
||||
int
|
||||
tty_batchmode( int onoff )
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue