The problem/use-case that the feature addresses

Allow the use of the environment variable to pass authentication instead of using command line arguments for redis-cli.

Description of the feature

To shutdown a redis instance service (authenticated using a password), we would need to pass password using -a flag. That is currently discouraged now, but I couldn't think of any other work around. We can probably use an environment to do the same job. (or, at-least edit the command line password just like we do for redis-server)

Alternatives you've considered

Couldn't think of any other alternatives.

Comment From: sreerajkksd

(or, at-least edit the command line password just like we do for redis-server)

By this, I meant we can call redisSetProcTitle or similar to edit the command line if auth data is passed.

Comment From: enjoy-binbin

Maybe you can try REDISCLI_AUTH environment like:

export REDISCLI_AUTH 123456
src/redis-cli

see the help message for more

  -a <password>      Password to use when connecting to the server.
                     You can also use the REDISCLI_AUTH environment
                     variable to pass this password more safely
                     (if both are used, this argument takes precedence)

Comment From: sreerajkksd

Thanks,. I didn't see that note. I can confirm that this is working fine for me.