From c543561137513e37ae17879366ebf4e10348daa2 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Fri, 16 Nov 2018 16:37:02 +0000 Subject: bash-completion: Drop "have" checks These don't work with and aren't needed by dynamically-loaded completions. Bug-Debian: https://bugs.debian.org/912852 Forwarded: no Last-Update: 2018-11-16 Patch-Name: bash-completion-drop-have-checks.patch --- .../bash-completion.d/grub-completion.bash.in | 39 +++++++------------ 1 file changed, 13 insertions(+), 26 deletions(-) diff --git a/util/bash-completion.d/grub-completion.bash.in b/util/bash-completion.d/grub-completion.bash.in index 44bf135b9..d4235e7ef 100644 --- a/util/bash-completion.d/grub-completion.bash.in +++ b/util/bash-completion.d/grub-completion.bash.in @@ -166,13 +166,11 @@ _grub_set_entry () { } __grub_set_default_program="@grub_set_default@" -have ${__grub_set_default_program} && \ - complete -F _grub_set_entry -o filenames ${__grub_set_default_program} +complete -F _grub_set_entry -o filenames ${__grub_set_default_program} unset __grub_set_default_program __grub_reboot_program="@grub_reboot@" -have ${__grub_reboot_program} && \ - complete -F _grub_set_entry -o filenames ${__grub_reboot_program} +complete -F _grub_set_entry -o filenames ${__grub_reboot_program} unset __grub_reboot_program @@ -198,8 +196,7 @@ _grub_editenv () { } __grub_editenv_program="@grub_editenv@" -have ${__grub_editenv_program} && \ - complete -F _grub_editenv -o filenames ${__grub_editenv_program} +complete -F _grub_editenv -o filenames ${__grub_editenv_program} unset __grub_editenv_program @@ -219,8 +216,7 @@ _grub_mkconfig () { fi } __grub_mkconfig_program="@grub_mkconfig@" -have ${__grub_mkconfig_program} && \ - complete -F _grub_mkconfig -o filenames ${__grub_mkconfig_program} +complete -F _grub_mkconfig -o filenames ${__grub_mkconfig_program} unset __grub_mkconfig_program @@ -254,13 +250,11 @@ _grub_setup () { } __grub_bios_setup_program="@grub_bios_setup@" -have ${__grub_bios_setup_program} && \ - complete -F _grub_setup -o filenames ${__grub_bios_setup_program} +complete -F _grub_setup -o filenames ${__grub_bios_setup_program} unset __grub_bios_setup_program __grub_sparc64_setup_program="@grub_sparc64_setup@" -have ${__grub_sparc64_setup_program} && \ - complete -F _grub_setup -o filenames ${__grub_sparc64_setup_program} +complete -F _grub_setup -o filenames ${__grub_sparc64_setup_program} unset __grub_sparc64_setup_program @@ -305,8 +299,7 @@ _grub_install () { fi } __grub_install_program="@grub_install@" -have ${__grub_install_program} && \ - complete -F _grub_install -o filenames ${__grub_install_program} +complete -F _grub_install -o filenames ${__grub_install_program} unset __grub_install_program @@ -327,8 +320,7 @@ _grub_mkfont () { fi } __grub_mkfont_program="@grub_mkfont@" -have ${__grub_mkfont_program} && \ - complete -F _grub_mkfont -o filenames ${__grub_mkfont_program} +complete -F _grub_mkfont -o filenames ${__grub_mkfont_program} unset __grub_mkfont_program @@ -358,8 +350,7 @@ _grub_mkrescue () { fi } __grub_mkrescue_program="@grub_mkrescue@" -have ${__grub_mkrescue_program} && \ - complete -F _grub_mkrescue -o filenames ${__grub_mkrescue_program} +complete -F _grub_mkrescue -o filenames ${__grub_mkrescue_program} unset __grub_mkrescue_program @@ -400,8 +391,7 @@ _grub_mkimage () { fi } __grub_mkimage_program="@grub_mkimage@" -have ${__grub_mkimage_program} && \ - complete -F _grub_mkimage -o filenames ${__grub_mkimage_program} +complete -F _grub_mkimage -o filenames ${__grub_mkimage_program} unset __grub_mkimage_program @@ -422,8 +412,7 @@ _grub_mkpasswd_pbkdf2 () { fi } __grub_mkpasswd_pbkdf2_program="@grub_mkpasswd_pbkdf2@" -have ${__grub_mkpasswd_pbkdf2_program} && \ - complete -F _grub_mkpasswd_pbkdf2 -o filenames ${__grub_mkpasswd_pbkdf2_program} +complete -F _grub_mkpasswd_pbkdf2 -o filenames ${__grub_mkpasswd_pbkdf2_program} unset __grub_mkpasswd_pbkdf2_program @@ -460,8 +449,7 @@ _grub_probe () { fi } __grub_probe_program="@grub_probe@" -have ${__grub_probe_program} && \ - complete -F _grub_probe -o filenames ${__grub_probe_program} +complete -F _grub_probe -o filenames ${__grub_probe_program} unset __grub_probe_program @@ -482,8 +470,7 @@ _grub_script_check () { fi } __grub_script_check_program="@grub_script_check@" -have ${__grub_script_check_program} && \ - complete -F _grub_script_check -o filenames ${__grub_script_check_program} +complete -F _grub_script_check -o filenames ${__grub_script_check_program} # Local variables: