mirror of
https://github.com/TheLocehiliosan/yadm
synced 2026-03-02 03:49:29 +00:00
Merge pull request #79 from Mellbourn/zsh-completion
* Unified the naming between bash and zsh * Cleaned up indentations, line endings * Tweaked documentation
This commit is contained in:
46
completion/yadm.zsh_completion
Normal file
46
completion/yadm.zsh_completion
Normal file
@@ -0,0 +1,46 @@
|
||||
#compdef yadm
|
||||
_yadm(){
|
||||
local -a _1st_arguments
|
||||
_1st_arguments=(
|
||||
'help:Display yadm command help'
|
||||
'init:Initialize an empty repository'
|
||||
'config:Configure a setting'
|
||||
'list:List tracked files'
|
||||
'alt:Create links for alternates'
|
||||
'bootstrap:Execute $HOME/.yadm/bootstrap'
|
||||
'encrypt:Encrypt files'
|
||||
'decrypt:Decrypt files'
|
||||
'perms:Fix perms for private files'
|
||||
'add:git add'
|
||||
'push:git push'
|
||||
'pull:git pull'
|
||||
'diff:git diff'
|
||||
'checkout:git checkout'
|
||||
'co:git co'
|
||||
'commit:git commit'
|
||||
'ci:git ci'
|
||||
'status:git status'
|
||||
'st:git st'
|
||||
'reset:git reset'
|
||||
'log:git log'
|
||||
)
|
||||
|
||||
local context state line expl
|
||||
local -A opt_args
|
||||
|
||||
_arguments '*:: :->subcmds' && return 0
|
||||
|
||||
if (( CURRENT == 1 )); then
|
||||
_describe -t commands "yadm commands" _1st_arguments -V1
|
||||
return
|
||||
fi
|
||||
|
||||
case "$words[1]" in
|
||||
*)
|
||||
_arguments ':filenames:_files'
|
||||
;;
|
||||
esac
|
||||
|
||||
}
|
||||
|
||||
_yadm "$@"
|
||||
Reference in New Issue
Block a user