mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 16:18:28 -05:00
Merge pull request #1192 from badboy/ipv6-rediscli
Wrap IPv6 in brackets in the prompt.
This commit is contained in:
commit
2ed64e1f7a
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user