redis-cli: Aligned RESP3 maps with multiline value in TTY#10170
Merged
oranagra merged 1 commit intoredis:unstablefrom Jan 25, 2022
Merged
redis-cli: Aligned RESP3 maps with multiline value in TTY#10170oranagra merged 1 commit intoredis:unstablefrom
oranagra merged 1 commit intoredis:unstablefrom
Conversation
Before:
```
127.0.0.1:6379> command info get
1) 1) "get"
2) (integer) 2
3) 1~ readonly
2~ fast
4) (integer) 1
5) (integer) 1
6) (integer) 1
7) 1~ @READ
2~ @string
3~ @fast
8) (empty set)
9) 1~ 1# "flags" => 1~ RO
2~ access
2# "begin_search" => 1# "type" => "index"
2# "spec" => 1# "index" => (integer) 1
3# "find_keys" => 1# "type" => "range"
2# "spec" => 1# "lastkey" => (integer) 0
2# "keystep" => (integer) 1
3# "limit" => (integer) 0
10) (empty set)
```
After:
```
127.0.0.1:6379> command info get
1) 1) "get"
2) (integer) 2
3) 1~ readonly
2~ fast
4) (integer) 1
5) (integer) 1
6) (integer) 1
7) 1~ @READ
2~ @string
3~ @fast
8) (empty set)
9) 1~ 1# "flags" =>
1~ RO
2~ access
2# "begin_search" =>
1# "type" => "index"
2# "spec" => 1# "index" => (integer) 1
3# "find_keys" =>
1# "type" => "range"
2# "spec" =>
1# "lastkey" => (integer) 0
2# "keystep" => (integer) 1
3# "limit" => (integer) 0
10) (empty set)
```
oranagra
approved these changes
Jan 25, 2022
Member
oranagra
left a comment
There was a problem hiding this comment.
LGTM.
waiting for a few hours to see if someone more familiar than me in that area has any comment.
zuiderkwast
added a commit
to filipecosta90/redis-doc
that referenced
this pull request
Jan 25, 2022
Alignment improved by redis/redis#10170 (to be merged)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As before, a map is rendered as
key => value, but ifvalueis multiline (e.g. if it's another map with > 1 element), a linebreak is inserted after=>to align the nested value's first line with the remaining lines.Before:
After: