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
cf0c6b78
Commit
cf0c6b78
authored
Aug 04, 2010
by
Pieter Noordhuis
Browse files
Set tty before going into interactive mode to get non-pretty output when
the commands are read from stdin.
parent
3a51bff0
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/redis-cli.c
View file @
cf0c6b78
...
@@ -496,7 +496,7 @@ int main(int argc, char **argv) {
...
@@ -496,7 +496,7 @@ int main(int argc, char **argv) {
config
.
raw_output
=
0
;
config
.
raw_output
=
0
;
config
.
auth
=
NULL
;
config
.
auth
=
NULL
;
config
.
historyfile
=
NULL
;
config
.
historyfile
=
NULL
;
config
.
tty
=
1
;
config
.
tty
=
isatty
(
fileno
(
stdout
))
||
(
getenv
(
"FAKETTY"
)
!=
NULL
)
;
config
.
mb_sep
=
'\n'
;
config
.
mb_sep
=
'\n'
;
if
(
getenv
(
"HOME"
)
!=
NULL
)
{
if
(
getenv
(
"HOME"
)
!=
NULL
)
{
...
@@ -522,7 +522,6 @@ int main(int argc, char **argv) {
...
@@ -522,7 +522,6 @@ int main(int argc, char **argv) {
repl
();
repl
();
}
}
config
.
tty
=
isatty
(
fileno
(
stdout
))
||
(
getenv
(
"FAKETTY"
)
!=
NULL
);
argvcopy
=
convertToSds
(
argc
+
1
,
argv
);
argvcopy
=
convertToSds
(
argc
+
1
,
argv
);
if
(
config
.
argn_from_stdin
)
{
if
(
config
.
argn_from_stdin
)
{
sds
lastarg
=
readArgFromStdin
();
sds
lastarg
=
readArgFromStdin
();
...
...
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