mirror of
https://github.com/TheLocehiliosan/yadm
synced 2024-10-27 20:34:27 +00:00
47 lines
1.0 KiB
Plaintext
47 lines
1.0 KiB
Plaintext
|
#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 "$@"
|