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
1b696dc0
Commit
1b696dc0
authored
Jul 11, 2013
by
Jan-Erik Rediger
Browse files
Wrap IPv6 in brackets in the prompt.
parent
73ae8558
Changes
1
Show whitespace changes
Inline
Side-by-side
src/redis-cli.c
View file @
1b696dc0
...
...
@@ -116,7 +116,8 @@ static void cliRefreshPrompt(void) {
len
=
snprintf
(
config
.
prompt
,
sizeof
(
config
.
prompt
),
"redis %s"
,
config
.
hostsocket
);
else
len
=
snprintf
(
config
.
prompt
,
sizeof
(
config
.
prompt
),
"redis %s:%d"
,
len
=
snprintf
(
config
.
prompt
,
sizeof
(
config
.
prompt
),
strchr
(
config
.
hostip
,
':'
)
?
"[%s]:%d"
:
"%s:%d"
,
config
.
hostip
,
config
.
hostport
);
/* Add [dbnum] if needed */
if
(
config
.
dbnum
!=
0
)
...
...
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