]> src.twobees.de Git - dotfiles.git/blob - stow/oh-my-zsh/.oh-my-zsh/plugins/redis-cli/_redis-cli
...
[dotfiles.git] / stow / oh-my-zsh / .oh-my-zsh / plugins / redis-cli / _redis-cli
1 #compdef redis-cli rec
2 #autoload
3
4 #redis cli completion, based off homebrew completion (ref. 2011-04-14)
5
6 local -a _1st_arguments
7 _1st_arguments=(
8   'append:append a value to a key'
9   'auth:authenticate to the server'
10   'bgrewriteeaof:asynchronously rewrite the append-only file'
11   'bgsave:asynchronously save the dataset to disk'
12   'blpop:remove and get the first element in a list, or block until one is available'
13   'brpop:remove and get the last element in a list, or block until one is available'
14   'brpoplpush:pop a value from a list, push it to another list and return it; or block until one is available'
15   # 'config get:get the value of a configuration parameter'
16   # 'config set:set a configuration parameter to the given value'
17   # 'config resetstat: reset the stats returned by INFO'
18   'dbsize:return the number of keys in the selected database'
19   # 'debug object:get debugging information about a key'
20   # 'debug segfault:make the server crash'
21   'decr:decrement the integer value of a key by one'
22   'decrby:decrement the integer value of a key by the given number'
23   'del:delete a key'
24   'discard:discard all commands issued after MULTI'
25   'echo:echo the given string'
26   'exec:execute all commands issued after a MULTI'
27   'exists:determine if a key exists'
28   'expire:set the time to live for a key, in seconds'
29   'expireat:set the expiration for a key as a UNIX timestamp'
30   'flushall:remove all keys from all databases'
31   'flushdb:remove all keys from the current database'
32   'get:get the value of a key'
33   'getbit:returns the bit value at offset in the string value stored at key'
34   'getrange:get a substring of the string stored at a key'
35   'getset:set the string value of a key and return its old value'
36   'hdel:delete a hash field'
37   'hexists:determine if a hash field exists'
38   'hget:get the value of a hash field'
39   'hgetall:get all the fields and values in a hash'
40   'hincrby:increment the integer value of a hash field by the given number'
41   'hkeys:get all the fields in a hash'
42   'hlen:get the number of fields in a hash'
43   'hmget:get the values of all the given hash fields'
44   'hmset:set multiple hash fields to multiple values'
45   'hset:set the string value of a hash field'
46   'hsetnx:set the value of a hash field, only if the field does not exist'
47   'hvals:get all the values in a hash'
48   'incr:increment the integer value of a key by one'
49   'incrby:increment the integer value of a key by the given number'
50   'info:get information and statistics about the server'
51   'keys:find all keys matching the given pattern'
52   'lastsave:get the UNIX timestamp of the last successful save to disk'
53   'lindex:get an element from a list by its index'
54   'linsert:insert an element before or after another element in a list'
55   'llen:get the length of a list'
56   'lpop:remove and get the first element in a list'
57   'lpush:prepend a value to a list'
58   'lpushx:prepend a value to a list, only if the list exists'
59   'lrange:get a range of elements from a list'
60   'lrem:remove elements from a list'
61   'lset:set the value of an element in a list by its index'
62   'ltrim:trim a list to the specified range'
63   'mget:get the values of all the given keys'
64   'monitor:listen for all requests received by the server in real time'
65   'move:move a key to another database'
66   'mset:set multiple keys to multiple values'
67   'msetnx:set multiple keys tom ultiple values, only if none of the keys exist'
68   'multi:mark the start of a transaction block'
69   'object:inspect the internals of Redis objects'
70   'persist:remove the expiration from a key'
71   'ping:ping the server'
72   'psubscribe:listen for messages published to channels matching the given patterns'
73   'publish:post a message to a channel'
74   'punsubscribe:stop listening for messages posted to channels matching the given patterns'
75   'quit:close the connection'
76   'randomkey:return a random key from the keyspace'
77   'rename:rename a key'
78   'renamenx:rename a key, only if the new key does not exist'
79   'rpop:remove and get the last element in a list'
80   'rpoplpush:remove the last element in a list, append it to another list and return it'
81   'rpush:append a value to a list'
82   'rpushx:append a value to a list, only if the list exists'
83   'sadd:add a member to a set'
84   'save:synchronously save the dataset to disk'
85   'scard:get the number of members in a set'
86   'sdiff:subtract multiple sets'
87   'sdiffstore:subtract multiple sets and store the resulting set in a key'
88   'select:change the selected database for the current connection'
89   'set:set the string value of a key'
90   'setbit:sets or clears the bit at offset in the string value stored at key'
91   'setex:set the value and expiration of a key'
92   'setnx:set the value of a key, only if the key does not exist'
93   'setrange:overwrite part of a string at key starting at the specified offset'
94   'shutdown:synchronously save the dataset to disk and then shut down the server'
95   'sinter:intersect multiple sets'
96   'sinterstore:intersect multiple sets and store the resulting set in a key'
97   'sismember:determine if a given value is a member of a set'
98   'slaveof:make the server a slave of another instance, or promote it as master'
99   'smembers:get all the members in a set'
100   'smove:move a member from one set to another'
101   'sort:sort the elements in a list, set or sorted set'
102   'spop:remove and return a random member from a set'
103   'srandmember:get a random member from a set'
104   'srem:remove a member from a set'
105   'strlen:get the length of the value stored in a key'
106   'subscribe:listen for messages published to the given channels'
107   'sunion:add multiple sets'
108   'sunionstore:add multiple sets and store the resulting set in a key'
109   'ttl:get the time to live for a key'
110   'type:determine the type stored at key'
111   'unsubscribe:stop listening for messages posted to the given channels'
112   'unwatch:forget about all watched keys'
113   'watch:watch the given keys to determine execution of the MULTI/EXEC block'
114   'zadd:add a member to a sorted set, or update its score if it already exists'
115   'zcard:get the number of members in a sorted set'
116   'zcount:count the members in a sorted set with scores within the given values'
117   'zincrby:increment the score of a member in a sorted set'
118   'zinterstore:intersect multiple sorted sets and store the resulting sorted set in a new key'
119   'zrange:return a range of members in a sorted set, by index'
120   'zrangebyscore:return a range of members in a sorted set, by score'
121   'zrank:determine the index of a member in a sorted set'
122   'zrem:remove a member from a sorted set'
123   'zremrangebyrank:remove all members in a sorted set within the given indexes'
124   'zremrangebyscore:remove all members in a sorted set within the given scores'
125   'zrevrange:return a range of members in a sorted set, by index, with scores ordered from high to low'
126   'zrevrangebyscore:return a range of members in a sorted set, by score, with scores ordered from high to low'
127   'zrevrank:determine the index of a member in a sorted set, with scores ordered from high to low'
128   'zscore:get the score associated with the given member in a sorted set'
129   'zunionstore:add multiple sorted sets and store te resulting sorted set in a new key'
130 )
131
132 local expl
133
134 _arguments \
135   '(-v --version)'{-v,--version}'[show version]' \
136   '(-h --help)'{-h,--help}'[show help]' \
137   '*:: :->subcmds' && return 0
138
139 if (( CURRENT == 1 )); then
140   _describe -t commands "redis-cli subcommand" _1st_arguments
141   return
142 fi