COMMAND LIST
Syntax
COMMAND LIST [FILTERBY <ACLCAT category | PATTERN pattern | MODULE module>]
Module
adminCategories
admin slowDescription
Get the list of command names. Allows for filtering by ACL category or glob pattern.
Options
FILTERBY - An optional condition used to filter the response. ACLCAT filters by the provided acl category string. PATTERN filters the response by the provided glob pattern. MODULE filters the response by the provided SugarDB module.
Examples
- Go (Embedded)
- CLI
Get a list of all the loaded commands:
db, err := sugardb.NewSugarDB()
if err != nil {
log.Fatal(err)
}
commands, err := db.CommandList(sugardb.CommandListOptions{})
Get a list of all commands with the "fast" ACL category:
db, err := sugardb.NewSugarDB()
if err != nil {
log.Fatal(err)
}
commands, err := db.CommandList(sugardb.CommandListOptions{ACLCAT: "fast"})
Get a list of all commands which satisfy the "z*" glob pattern:
db, err := sugardb.NewSugarDB()
if err != nil {
log.Fatal(err)
}
commands, err := db.CommandList(sugardb.CommandListOptions{PATTERN: "z*"})
Get a list of all the commands in the "set" module:
db, err := sugardb.NewSugarDB()
if err != nil {
log.Fatal(err)
}
commands, err := db.CommandList(sugardb.CommandListOptions{MODULE: "set"})
Get a list of all the loaded commands:
> COMMAND LIST
Get a list of all commands with the "fast" ACL category:
> COMMAND LIST FILTERBY ACLCAT fast
Get a list of all commands which satisfy the "z*" glob pattern:
> COMMAND LIST FILTERBY PATTERN z*
Get a list of all the commands in the "set" module:
> COMMAND LIST FILTERBY MODULE set