antirez/redis — pull request #2116 by mattsta (2014-10-31 02:34:58+00:00)
Title: redis-cli: allow enable cluster mode during a CLI session

Also add an alias for connect to "con" because typing "connect"
takes too long.

New cli commands (with shorthand options):
- enable/en cluster = enable cluster mode
- disable/dis/no cluster = disable cluster mode

Example usage:
127.0.0.1:7000> get a
(error) MOVED 15495 127.0.0.1:7002
127.0.0.1:7000> en cluster
127.0.0.1:7000> get a
-> Redirected to slot [15495] located at 127.0.0.1:7002
(nil)
127.0.0.1:7002>

(The first "get" fails with MOVED, then we "en cluster" to enable
cluster redirect following, then the second "get" follows the
MOVED and works.)

This commit also keeps client-only commands on the client
so they don't leak to the server.

Fixes #2112 as well