Skip to content

Commit dac3c16

Browse files
committed
fixup! mingw: Support git_terminal_prompt with more terminals
Use 'read -r', so that '\' is interpreted verbatim rather than as escape character. Signed-off-by: Karsten Blees <[email protected]>
1 parent 2113021 commit dac3c16

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compat/terminal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ static char *xterm_prompt(const char *prompt, int echo)
9898
{
9999
const char *read_input[] = {
100100
"sh", "-c",
101-
"cat >/dev/tty && read line </dev/tty && echo \"$line\"",
101+
"cat >/dev/tty && read -r line </dev/tty && echo \"$line\"",
102102
NULL
103103
};
104104
const char *echo_off[] = { "sh", "-c", "stty -echo </dev/tty", NULL };

0 commit comments

Comments
 (0)