Add dotfiles.sh zsh autocomplete

This commit is contained in:
Riyyi
2019-05-10 16:06:14 +02:00
parent cef7b7133c
commit f6408c057a
3 changed files with 26 additions and 1 deletions
+24
View File
@@ -0,0 +1,24 @@
#compdef dotfiles.sh
_dotfiles.sh() {
integer ret=1
local -a args
args+=(
'(- *)'{-a,--add}'[add file to the dotfiles directory]:file:_files'
'(- *)'{-f,--files}'[display all files added to the dotfiles directory]'
'(- *)'{-h,--help}'[display usage message and exit]'
'(- *)'{-p,--packages}'[instal, list or store packages]:packages:((
install\:"install all core packages of the stored list"
list\:"display all packages installed on the system (default)"
store\:"stores a list of all installed packages"
))'
'(- *)'{-l,--pull}'[pull each added file from system to dotfiles directory]'
'(- *)'{-s,--push}'[push each added file to its location on the system]'
)
_arguments $args[@] && ret=0
return ret
}
_dotfiles.sh