grub-2.0: fix bash completion script

+26
+2
pkgs/tools/misc/grub/2.0x.nix
··· 51 51 -e "s|/usr/src/unifont.bdf|$PWD/unifont.bdf|g" 52 52 ''; 53 53 54 + patches = [ ./fix-bash-completion.patch ]; 55 + 54 56 configureFlags = 55 57 let arch = if stdenv.system == "i686-linux" then "i386" 56 58 else if stdenv.system == "x86_64-linux" then "x86_64"
+24
pkgs/tools/misc/grub/fix-bash-completion.patch
··· 1 + diff -ubr grub-2.00-orig/util/bash-completion.d/grub-completion.bash.in grub-2.00/util/bash-completion.d/grub-completion.bash.in 2 + --- grub-2.00-orig/util/bash-completion.d/grub-completion.bash.in 2012-10-16 19:02:36.342733957 +0200 3 + +++ grub-2.00/util/bash-completion.d/grub-completion.bash.in 2012-10-16 19:04:48.262733941 +0200 4 + @@ -17,6 +17,12 @@ 5 + # along with GRUB. If not, see <http://www.gnu.org/licenses/>. 6 + # bash completion for grub 7 + 8 + +have() 9 + +{ 10 + + unset -v have 11 + + _have $1 && have=yes 12 + +} 13 + + 14 + __grub_dir() { 15 + local i c=1 boot_dir 16 + 17 + @@ -479,6 +485,7 @@ 18 + have ${__grub_script_check_program} && \ 19 + complete -F _grub_script_check -o filenames ${__grub_script_check_program} 20 + 21 + +unset -f have 22 + 23 + # Local variables: 24 + # mode: shell-script