From: Tom Gundersen Date: Thu, 6 Feb 2014 17:15:47 +0000 (+0100) Subject: zsh-completions: kernel-install - only show existing kernels for 'remove' X-Git-Tag: v209~229 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=d72143bad46b51fc0bbedf01ff92aea8b07afac6 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. --- diff --git a/shell-completion/zsh/_kernel-install b/shell-completion/zsh/_kernel-install index 065518834..4fdd3a4ae 100644 --- a/shell-completion/zsh/_kernel-install +++ b/shell-completion/zsh/_kernel-install @@ -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