mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-22 04:51:12 +02:00
Add joe plugin
This commit is contained in:
parent
d848c94804
commit
786e655a28
1 changed files with 25 additions and 0 deletions
25
plugins/joe/joe.plugin.zsh
Normal file
25
plugins/joe/joe.plugin.zsh
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
# Completion script for joe. You need to install joe first. See https://github.com/karan/joe
|
||||||
|
# License: MIT License
|
||||||
|
# Author: ChenPeng <rojazz1999@gmail.com>
|
||||||
|
|
||||||
|
function _joe_completion() {
|
||||||
|
local -a _1st_arguments
|
||||||
|
_1st_arguments=(
|
||||||
|
"list:list all available files"
|
||||||
|
"update:update all available gitignore files"
|
||||||
|
"generate:generate gitignore files"
|
||||||
|
"help:Shows a list of commands or help for one command"
|
||||||
|
)
|
||||||
|
local label_subcommand="joe subcommand"
|
||||||
|
if (( CURRENT == 2 )); then
|
||||||
|
_describe -t commands "$label_subcommand" _1st_arguments
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
case ${words[2]} in
|
||||||
|
generate)
|
||||||
|
_values -s ',' 'generate' `joe ls | sed -n "2p" | sed "s/,//g"`
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
compdef _joe_completion joe
|
||||||
Loading…
Add table
Add a link
Reference in a new issue