summaryrefslogtreecommitdiffstats
path: root/debian/bash_completion.d
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 13:40:54 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 13:40:54 +0000
commit0336e3b7a97fe9ab118065eff0b25fad507a9a50 (patch)
treee49702ccec26f0ace090ed80ad22ec9a4a8975ab /debian/bash_completion.d
parentAdding upstream version 5:7.2.4. (diff)
downloadredis-0336e3b7a97fe9ab118065eff0b25fad507a9a50.tar.xz
redis-0336e3b7a97fe9ab118065eff0b25fad507a9a50.zip
Adding debian version 5:7.2.4-1.debian/5%7.2.4-1debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/bash_completion.d')
-rw-r--r--debian/bash_completion.d/redis-cli30
1 files changed, 30 insertions, 0 deletions
diff --git a/debian/bash_completion.d/redis-cli b/debian/bash_completion.d/redis-cli
new file mode 100644
index 0000000..d4cb3f5
--- /dev/null
+++ b/debian/bash_completion.d/redis-cli
@@ -0,0 +1,30 @@
+# -*- 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