Bash completion for the grubby command, zsh should works with bashcompinit
The grubby tool provides many options for managing boot entries. However, in most day-to-day scenarios, only a subset of them are commonly used.
This completion script focuses on commands that are most relevant to switching kernels and managing kernel parameters.
Copy the completion script to bash-completion directory and source it,
cp grubby-completion.bash /usr/share/bash-completion/completions/grubby
source /usr/share/bash-completion/completions/grubbyVerify that completion works by typing,
grubby --<TAB>This script can also be used in zsh through bashcompinit.
Add the following to your ~/.zshrc,
# Enable Zsh's completion system
autoload -Uz compinit && compinit
# Enable Bash completion compatibility
autoload bashcompinit && bashcompinit
# Source grubby Bash completion script
source /usr/share/bash-completion/completions/grubbygrubby --default-kernel
grubby --default-index
grubby --default-title
grubby --info ALL | DEFAULT | [KERNEL]
grubby --make-default
grubby --set-default=[KERNEL]
grubby --set-default-index=[KERNEL-ENTRY-INDEX]
grubby --update-kernel=[KERNEL] --args=[ARGS-TO-ADD]
grubby --update-kernel=[KERNEL] --remove-args=[ARGS-TO-REMOVE]