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
2ed64e1f
Commit
2ed64e1f
authored
Jul 12, 2013
by
Salvatore Sanfilippo
Browse files
Merge pull request #1192 from badboy/ipv6-rediscli
Wrap IPv6 in brackets in the prompt.
parents
73ae8558
1b696dc0
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/redis-cli.c
View file @
2ed64e1f
...
...
@@ -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