mirror of
https://github.com/systemd/systemd.git
synced 2025-05-29 01:05:59 +03: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.
This commit is contained in:
parent
a50df72b37
commit
d72143bad4
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user