Skip to content

Commit

Permalink
Fix for IBM-Cloud#2
Browse files Browse the repository at this point in the history
  • Loading branch information
codepope committed Aug 21, 2018
1 parent eedbac3 commit b957b8f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion redli.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,10 @@ func redisParseInfo(reply string) map[string]string {

func getPrompt() string {
if *longprompt {
return fmt.Sprintf("%s:%s> ", (*redisurl).Hostname(), (*redisurl).Port())
if *redisurl != nil {
return fmt.Sprintf("%s:%s> ", (*redisurl).Hostname(), (*redisurl).Port())
}
return fmt.Sprintf("%s:%d> ", *redishost, *redisport)
}

return "> "
Expand Down

0 comments on commit b957b8f

Please sign in to comment.