mirror of
https://github.com/git/git.git
synced 2024-11-18 05:03:56 +01:00
e22b245ea5
Currently, git will share its console with all its children (unless they create their own), and is therefore possible that any of them that might change the settings for it could affect its operations once completed. Refactor the platform specific functionality to save the terminal settings and expand it to also do so for the output handler. This will allow for the state of the terminal to be saved and restored around a child that might misbehave (ex vi) which will be implemented next. Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 lines
314 B
C
13 lines
314 B
C
#ifndef COMPAT_TERMINAL_H
|
|
#define COMPAT_TERMINAL_H
|
|
|
|
int save_term(int full_duplex);
|
|
void restore_term(void);
|
|
|
|
char *git_terminal_prompt(const char *prompt, int echo);
|
|
|
|
/* Read a single keystroke, without echoing it to the terminal */
|
|
int read_key_without_echo(struct strbuf *buf);
|
|
|
|
#endif /* COMPAT_TERMINAL_H */
|