Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Xxghv-0004xS-94 for mharc-grub-devel@gnu.org; Sun, 07 Dec 2014 13:37:23 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42602) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xxghk-0004xF-Kb for grub-devel@gnu.org; Sun, 07 Dec 2014 13:37:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xxghb-0005Ls-JM for grub-devel@gnu.org; Sun, 07 Dec 2014 13:37:12 -0500 Received: from mail-lb0-x236.google.com ([2a00:1450:4010:c04::236]:46928) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xxghb-0005Lk-B0 for grub-devel@gnu.org; Sun, 07 Dec 2014 13:37:03 -0500 Received: by mail-lb0-f182.google.com with SMTP id f15so3069086lbj.13 for ; Sun, 07 Dec 2014 10:37:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=tMSnG9IDm3Ov89ucn2A8xFizCaaePhlVtP5XhKIz1+Y=; b=QE4kqQvJ71yEYfHrbHXVC0G3DfjD6gCQ9JvKF3EOAArPwsqXXcY90briXu+wen0NiJ UXUuNmWZrI/eObq5o7u9kaVShSTdx9h12BsIYZ1zRRk09QkHBCIbeMm7JNjgEfL7hp/7 M+RUX5wWiBmPDtROD7aKjivdMoP7BKKgdG2mnJvJvM+z84gXVtsgADeihMQuqzI0Wifr 3kc+rmg3UNvYKTHPHPlgcHKl6tq6y5ovg6BNzjw+H5mqmdxSRZYL/KmqjwqC2UGVPESL lOONPD302vwS4UhS513hhWrehOAxi3XvTDHL8AsUp3loc5TgkLotubpRFuVq0d1KRiwO n60w== X-Received: by 10.152.43.12 with SMTP id s12mr12507001lal.67.1417977422303; Sun, 07 Dec 2014 10:37:02 -0800 (PST) Received: from opensuse.site (ppp91-76-15-25.pppoe.mtu-net.ru. [91.76.15.25]) by mx.google.com with ESMTPSA id wq1sm10157542lbb.24.2014.12.07.10.37.00 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 07 Dec 2014 10:37:01 -0800 (PST) Date: Sun, 7 Dec 2014 21:37:00 +0300 From: Andrei Borzenkov To: Justin Subject: Re: [PATCH] bash-completion: Remove obsolete usage of 'have' function Message-ID: <20141207213700.69b5f4f7@opensuse.site> In-Reply-To: References: <1417836143-14836-1-git-send-email-floppym@gentoo.org> <20141206095951.269bdf8c@opensuse.site> X-Mailer: Claws Mail 3.11.0 (GTK+ 2.24.25; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c04::236 Cc: grub-devel@gnu.org X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Dec 2014 18:37:21 -0000 =D0=92 Sun, 7 Dec 2014 18:23:13 +0000 (UTC) Justin =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > Andrei Borzenkov gmail.com> writes: >=20 > > > > =D0=92 Fri, 5 Dec 2014 22:22:23 -0500 > > Mike Gilbert gentoo.org> =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > > > > > Recent versions of bash-completion do not provide the 'have' function. > > > > It still does as of today GIT. > > >=20 >=20 > # Backwards compatibility for compat completions that use have(). > # @deprecated should no longer be used; generally not needed with dynamic= ally > # loaded completions, and _have is suitable for runtime use. > have() > { > unset -v have > _have && have=3Dyes > } >=20 > All major Linux distributions are using bash-completion version which sup= port > dynamically loaded completions. Therefor we should cleanup shipped > bash-completions. >=20 > > > To keep things simple, this patch just removes it completely. > > > > No, that is not what was intended when 'have' was deprecated. You should > > put completion for each command in separate function which is then > > autoloaded on demand. >=20 > It was intended that you have one file (or a symlink) with the name of the > command which will be completed. That means dropping all have and pointing > symlinks with all support completions will fix it. >=20 That was what I meant. Sorry, had to say "file" not "function". > Or how would you update to recent bash-completion? > bash-completion will process /etc/bash_completion.d and will source current grub completion just fine. But if you want to really adapt it, just removing calls to have() is not enough; you also need to fix install target and probably split it in separate files for each command.