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
cda0cdfb
Commit
cda0cdfb
authored
Mar 25, 2013
by
antirez
Browse files
redis-trib: Don't use colorization if TERM != xterm.
parent
4286d8b9
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/redis-trib.rb
View file @
cda0cdfb
...
@@ -40,6 +40,7 @@ def xputs(s)
...
@@ -40,6 +40,7 @@ def xputs(s)
color
=
nil
color
=
nil
end
end
color
=
nil
if
ENV
[
'TERM'
]
!=
"xterm"
print
"
\033
[
#{
color
}
m"
if
color
print
"
\033
[
#{
color
}
m"
if
color
print
s
print
s
print
"
\033
[0m"
if
color
print
"
\033
[0m"
if
color
...
...
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