Redis redis-cli configuration example for Ubuntu 12.04 LTS (Precise Pangolin)

Get the default configuration file redis-cli for Redis, optimized for Ubuntu 12.04 LTS (Precise Pangolin). This example configuration ensures optimal compatibility and performance for Redis, making it easy to set up and adjust to meet your needs.

Find and download the configuration file here: /etc/bash_completion.d/redis-cli.

For more configurations and setup guides, visit our related files section to further customize your system.

    # -*- sh -*-
#
# Bash completion function for the 'redis-cli' command.
#
# Steve
# --
# http://www.steve.org.uk
#

_redis-cli()
{
    COMPREPLY=()
    cur=${COMP_WORDS[COMP_CWORD]}
    prev=${COMP_WORDS[COMP_CWORD-1]}

    #
    #  All known commands accepted.  Sorted.
    #
    opts='bgrewriteaof bgsave dbsize debug decr decrby del echo exists expire expireat flushall flushdb get getset incr incrby info keys lastsave lindex llen lpop lpush lrange lrem lset ltrim mget move mset msetnx ping randomkey rename renamenx rewriteaof rpop rpoplpush rpush sadd save scard sdiff sdiffstore select set setnx shutdown sinter sinterstore sismember slaveof smembers smove sort spop srandmember srem sunion sunionstore ttl type zadd zcard zincrby zrange zrangebyscore zrem zremrangebyscore zrevrange zscore'

    #
    #  Only complete on the first term.
    #
    if [ $COMP_CWORD -eq 1 ]; then
        COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
        return 0
    fi

}
complete -F _redis-cli redis-cli

    
  

Config Details

Location
/etc/bash_completion.d/redis-cli
Operating system
Ubuntu 12.04 LTS (Precise Pangolin)
Length
30 lines
MD5 checksum
848565df7f222dc03c8d5cb34b9e0188

Usage

Download the raw file with wget or curl

Wget

wget -O redis-cli.example https://exampleconfig.com/static/raw/redis/ubuntu12.04/etc/bash_completion.d/redis-cli

cURL

curl https://exampleconfig.com/static/raw/redis/ubuntu12.04/etc/bash_completion.d/redis-cli > redis-cli.example