mirror of
https://github.com/clearlinux/systemd-stable.git
synced 2026-09-06 13:41:31 +00:00
zsh-completions: kernel-install - only show existing kernels for 'remove'
When we remove a kernel, we don't remove the modules, so don't look at the modules directory to find installed kernels.
(cherry picked from commit d72143bad4)
This commit is contained in:
committed by
Colin Guthrie
parent
14cf8f97d1
commit
91602b7c82
@@ -12,7 +12,7 @@ _kernels(){
|
||||
read _MACHINE_ID < /etc/machine-id
|
||||
_kernel=( /lib/modules/[0-9]* )
|
||||
if [[ "$cmd" == "remove" && -n "$_MACHINE_ID" ]]; then
|
||||
_kernel=( /lib/modules/[0-9]* "/boot/$_MACHINE_ID"/[0-9]* )
|
||||
_kernel=( "/boot/$_MACHINE_ID"/[0-9]* )
|
||||
fi
|
||||
_kernel=( ${_kernel##*/} )
|
||||
_describe "installed kernels" _kernel
|
||||
|
||||
Reference in New Issue
Block a user