Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
ae77016e
Commit
ae77016e
authored
Aug 25, 2010
by
Pieter Noordhuis
Browse files
Add a newline to tty output after every reply
parent
5d15b520
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/redis-cli.c
View file @
ae77016e
...
...
@@ -226,7 +226,7 @@ static int cliReadReply(int fd) {
case
'*'
:
return
cliReadMultiBulkReply
(
fd
);
default:
printf
(
"protocol error, got '%c' as reply type byte
\n
"
,
type
);
printf
(
"protocol error, got '%c' as reply type byte"
,
type
);
return
1
;
}
}
...
...
@@ -294,12 +294,8 @@ static int cliSendCommand(int argc, char **argv, int repeat) {
}
retval
=
cliReadReply
(
fd
);
if
(
retval
)
{
return
retval
;
}
if
(
!
config
.
raw_output
&&
config
.
tty
)
{
printf
(
"
\n
"
);
}
if
(
!
config
.
raw_output
&&
config
.
tty
)
printf
(
"
\n
"
);
if
(
retval
)
return
retval
;
}
return
0
;
}
...
...
tests/integration/redis-cli.tcl
View file @
ae77016e
...
...
@@ -36,9 +36,11 @@ start_server {tags {"cli"}} {
}
proc test_interactive_cli
{
name code
}
{
set ::env
(
FAKETTY
)
1
set fd
[
open_cli
]
test
"Interactive CLI:
$name
"
$code
close_cli $fd
unset ::env
(
FAKETTY
)
}
proc run_nontty_cli
{
args
}
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment