mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-23 14:20:08 +00:00
Commands completion for Tarantool's cartridge framework
This commit is contained in:
parent
9521837240
commit
60a823d8a4
2 changed files with 20 additions and 0 deletions
9
plugins/cartridge/README.md
Normal file
9
plugins/cartridge/README.md
Normal file
|
@ -0,0 +1,9 @@
|
|||
# Cartridge
|
||||
|
||||
This plugin provides completion for Tarantool [cartridge](https://www.tarantool.io/en/cartridge/) commands.
|
||||
|
||||
To use it add `cartridge` to the plugins array in your .zshrc file.
|
||||
|
||||
```zsh
|
||||
plugins=(... cartridge)
|
||||
```
|
11
plugins/cartridge/cartridge.plugin.zsh
Normal file
11
plugins/cartridge/cartridge.plugin.zsh
Normal file
|
@ -0,0 +1,11 @@
|
|||
|
||||
# Cartridge basic commands
|
||||
_cartridge_get_command_list () {
|
||||
cartridge | sed "1,/Available Commands/d" | awk '/^[ \t]*[a-z]+/ { print $1 }'
|
||||
}
|
||||
|
||||
_cartridge () {
|
||||
compadd `_cartridge_get_command_list`
|
||||
}
|
||||
|
||||
compdef _cartridge cartridge
|
Loading…
Reference in a new issue