feat: release v2.0.0 with tab completion, package filtering, db health checks, flatpak and logrotate
Build and Publish Release / Build Packages and Publish (push) Successful in 27s
Build and Publish Release / Build Packages and Publish (push) Successful in 27s
This commit is contained in:
1 parent
8d4157b42d
commit
8bec4ed932
27 files changed
+1053
-69
No files matched your search
@@ -0,0 +1,72 @@
|
||||
# bash completion for linux-updater
|
||||
|
||||
_linux_updater() {
|
||||
local cur prev words cword
|
||||
_init_completion -n : || return
|
||||
|
||||
local commands="update check release-upgrade clean health completion"
|
||||
local common_opts="-c --config -y --yes --non-interactive --dry-run --no-remediation --skip-preflight --json --reboot -h --help"
|
||||
|
||||
# Find the current subcommand (if any)
|
||||
local cmd=""
|
||||
local i
|
||||
for (( i=1; i < cword; i++ )); do
|
||||
case "${words[i]}" in
|
||||
update|check|release-upgrade|clean|health|completion)
|
||||
cmd="${words[i]}"
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Handle completion for previous option
|
||||
case "$prev" in
|
||||
-c|--config)
|
||||
_filedir json
|
||||
return 0
|
||||
;;
|
||||
-t|--target-release|--releasever)
|
||||
return 0
|
||||
;;
|
||||
--packages|--exclude)
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
|
||||
# If no subcommand has been entered yet
|
||||
if [[ -z "$cmd" ]]; then
|
||||
if [[ "$cur" == -* ]]; then
|
||||
COMPREPLY=( $(compgen -W "$common_opts -v --version" -- "$cur") )
|
||||
return 0
|
||||
else
|
||||
COMPREPLY=( $(compgen -W "$commands" -- "$cur") )
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
|
||||
# Subcommand-specific completions
|
||||
case "$cmd" in
|
||||
update)
|
||||
COMPREPLY=( $(compgen -W "$common_opts --packages --exclude --security --flatpak" -- "$cur") )
|
||||
;;
|
||||
check)
|
||||
COMPREPLY=( $(compgen -W "$common_opts" -- "$cur") )
|
||||
;;
|
||||
release-upgrade)
|
||||
COMPREPLY=( $(compgen -W "$common_opts -t --target-release --releasever" -- "$cur") )
|
||||
;;
|
||||
clean)
|
||||
COMPREPLY=( $(compgen -W "$common_opts --all" -- "$cur") )
|
||||
;;
|
||||
health)
|
||||
COMPREPLY=( $(compgen -W "$common_opts" -- "$cur") )
|
||||
;;
|
||||
completion)
|
||||
COMPREPLY=( $(compgen -W "bash zsh" -- "$cur") )
|
||||
;;
|
||||
esac
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
complete -F _linux_updater linux-updater
|
||||
Reference in new issue
Block a user