lujiajing1126 / redis-cli

A Redis-Cli Tool written in typescript for terminal

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Array not displayed in a usable way

pmuschi opened this issue · comments

rdcli outputs an array in a format that is not useful and should output in a way similar to redis-cli.

For the command "rdcli --host 172.17.0.1 XRANGE canstream 1590676222000 1590676223000", rdcli outputs...

1) [ '1590676222088-0', [Array] ]
2) [ '1590676222089-0', [Array] ]

where redis-cli, for the same command, outputs...

1) 1) "1590676222088-0"
   2) 1) "spns"
           2) "[{\"id\":184,\"value\":0,\"timestamp\":1590676222088},{\"id\":185,\"value\":30,\"timestamp\":1590676222088}]"
 2) 1) "1590676222089-0"
    2) 1) "spns"
       2) "[{\"id\":186,\"value\":1478,\"timestamp\":1590676222089},{\"id\":187,\"value\":2763,\"timestamp\":1590676222089}]"

Thanks for the feedback.

Please try the latest 2.0.0-alpha.4 version with the following command,

$ npm i -g redis-cli@next

If you have any further comment, pls reply in this issue.

Works as expected. Thanks!

# rdcli --version
2.0.0-alpha.3
# rdcli -h 172.17.0.1 XRANGE canstream 1591194409108 1591194409110
1) 1) 1591194409108-0
   2) 1) "spns"
      2) "[{"k":186,"v":1478},{"k":187,"v":2763}]"
2) 1) 1591194409108-1
   2) 1) "spns"
      2) "[{"k":188,"v":0},{"k":189,"v":0}]"
3) 1) 1591194409109-0
   2) 1) "spns"
      2) "[{"k":190,"v":24},{"k":191,"v":0}]"
4) 1) 1591194409110-0
   2) 1) "spns"
      2) "[{"k":63,"v":[64,0,0,255,255,255,255,255]}]"
5) 1) 1591194409110-1
   2) 1) "spns"
      2) "[{"k":180,"v":659},{"k":181,"v":0}]"