Added bash completion

This commit is contained in:
Dimitris Zlatanidis 2023-01-11 00:11:53 +02:00
parent 8ab2be3615
commit 8c31e0ccba

33
completion/slpkg Normal file
View file

@ -0,0 +1,33 @@
_slpkg_module()
{
local cur prev OPTS
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
case $cur in
-*)
OPTS="
--help
--version
update
upgrade
check-updates
configs
clean-logs
clean-tmp
build
install
download
remove
find
view
search
dependees
tracking
"
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
return 0
;;
esac
return 0
}
complete -F _slpkg_module slpkg