From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id aHFCDJdMD2MKbgAAbAwnHQ (envelope-from ) for ; Wed, 31 Aug 2022 13:57:11 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id EAJQDJdMD2OaBwAA9RJhRA (envelope-from ) for ; Wed, 31 Aug 2022 13:57:11 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id BC3A52660A for ; Wed, 31 Aug 2022 13:57:10 +0200 (CEST) Received: from localhost ([::1]:48136 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oTMLF-0003rH-Ib for larch@yhetil.org; Wed, 31 Aug 2022 07:57:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33622) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oTML8-0003pe-M1 for bug-guix@gnu.org; Wed, 31 Aug 2022 07:57:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:48685) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oTML8-0007Fu-DH for bug-guix@gnu.org; Wed, 31 Aug 2022 07:57:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oTML8-0006Ys-8L for bug-guix@gnu.org; Wed, 31 Aug 2022 07:57:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#57498: bash-completion completion functions not loaded when using guix home Resent-From: Andrew Tropin Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 31 Aug 2022 11:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57498 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Maze , 57498@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= , Tobias Geerinckx-Rice , Efraim Flashner Received: via spool by 57498-submit@debbugs.gnu.org id=B57498.166194697225162 (code B ref 57498); Wed, 31 Aug 2022 11:57:02 +0000 Received: (at 57498) by debbugs.gnu.org; 31 Aug 2022 11:56:12 +0000 Received: from localhost ([127.0.0.1]:38434 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oTMKJ-0006Xm-GK for submit@debbugs.gnu.org; Wed, 31 Aug 2022 07:56:11 -0400 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:35231) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oTMKF-0006XJ-7V for 57498@debbugs.gnu.org; Wed, 31 Aug 2022 07:56:09 -0400 Received: (Authenticated sender: andrew@trop.in) by mail.gandi.net (Postfix) with ESMTPSA id 20CFC1C0007; Wed, 31 Aug 2022 11:55:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=gm1; t=1661946961; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=fagwEE0KyyGNZJ3i2d/aajAJN1X/f1wqMBB1kuAzLB0=; b=FTPrA5kN1AHkcUCeZuGHDBZ7rp9ABbqUNPpFI70+GBwAUhdcvNmG4vQsvqS5kxbXYd4BES vWyGdbbtftj2QUrIry0gY50r7oaz7itbtyGsgOV2JrBDPnonbondAVbTHJIsfEw80oy55j k5EzIe2QHY1ESNQUW2HX+o8Ejb9jvzeYi0mNx2udbgEDa0cnuEyh2/d+gwD2wUXkGIm8Ce 0B2zNHHn7FPDdxLeUadXIrWZIHYk1lQWNYqbreMb9w73vwV3qVcbscxKCYNuDlQGK42kWh 8b2g3rr+ZIAXRPcFAcbZH3S8d/+fYGGAvwrAiXYkWw7NbMJkGNzgmwtNWd1kgQ== From: Andrew Tropin In-Reply-To: <20220831073502.ru6dye2wbgc6vrbu@ubik.pkbd.org> References: <20220831073502.ru6dye2wbgc6vrbu@ubik.pkbd.org> Date: Wed, 31 Aug 2022 14:55:54 +0300 Message-ID: <87wnaok4ol.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1661947030; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=fagwEE0KyyGNZJ3i2d/aajAJN1X/f1wqMBB1kuAzLB0=; b=bD1ORCcjaZldugDI+5Q9cITX7Rp/+v9ObvEM30haG/tf52YFzSiBS/90//ClDtUYvFqvMH /d1+tj/JaEJE+BQj9reyRnF2zjhitTgUrD+LyG2FakCg8JuRdzYHRZ2h/AOt3QY495fue6 J+t2E/YTh8JiR1ze6xrirhWHN4z1jaslBv9+abz5yjy84pD4agrxAkP6hOvcbqSosiQ/v1 sGuNYjruWqWKSITt1pon1GfD+qjpcSvRPC2Ag6U33CBJOoJGbys0vs+SMAkTFC5p6VPrZC 2vu/bVcB3FgN+TiGvvi0CilRNnpo1pmuSNwNGWo0N/6s+9ge3gkGWBNYcdXONA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1661947030; a=rsa-sha256; cv=none; b=cbtQShRgPab3X6K8SVryashKyYkLD2phiAxpshow7Lq9nitFKrRM8A1ZRkZiDRWPXEgGfE b9tq9sqa7ZkfULBKqSF5O1MoBMhfdyogEjpL9FTKlHgnNYI5v6bMyZQy92NK4G688ZDLuU rirRLLBsorXZMqzbLKWrA0GtkmxKAj2oLYV0zI1wBxMy1K6vZkgw+K32sjw9ivNxeMBbLe qLBn1u1DDQsG+Kj0lUZdI85Nac9+6paNpUo2PwpWLLraQD1pXnBXzXEA1u2kq49n3SfCA4 ARXac6cS6EIKXhHok/ls8BmF0QZFHOYwC/+fCfegXqlfdVfpZCpX1T7vyvwFhQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=trop.in header.s=gm1 header.b=FTPrA5kN; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 1.02 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=trop.in header.s=gm1 header.b=FTPrA5kN; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: BC3A52660A X-Spam-Score: 1.02 X-Migadu-Scanner: scn1.migadu.com X-TUID: c6ThlwNjcC3l --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On 2022-08-31 15:35, maze@pkbd.org wrote: > I don't install bash-completion into my system profile and I use only > guix home to install user packages. I typically don't guix install any > packages. > > While I do include the bash-completion package in my home configuration > file, the completion bash functions do not get loaded as needed, the > resulting user experience is as if bash-completion wasn't installed, > although .bashrc is edited in the typical way to load the main file > bash_completion. But, the shell code in bash_completion cannot find and > load the individual files containing the completion functions for > individual commands. > > The reason is that I don't have a ~/.guix-profile folder, my current > user profile is linked in ~/.guix-home/profile. The relevant path (in > my case) is not included in the search path for completion bash functions. > > In guix this completion functions search path is defined by the patch fou= nd at > gnu/packages/patches/bash-completion-directories.patch, where you can > see the path to the guix home user profile is missing. > > The patch below is a patch to the patch file I mention above from the > guix dource tree. It just adds 2 folders to the search path.=20 > > I verified that it works for me. Hi Maze! That's right, the similiar fix is already applied on core-updates branch 675c5c9bbd28e5e666903aa81efaec25b1573811, unfortunately bash-completion package update affects a lot of packages that's why it's not on master branch yet. Thank you for the patch, anyway! For now, while 1.4 is not released yet, as a temporary fix I can suggest to install the package providing bash-completion to ~/.guix-profile or system profile. There are other workarounds, but this one seems to be the easiest. > > --- > bash-completion: fix loading of completion functions with guix home > > * gnu/packages/patches/bash-completion-directories.patch: modified > --- > gnu/packages/patches/bash-completion-directories.patch | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/gnu/packages/patches/bash-completion-directories.patch b/gnu= /packages/patches/bash-completion-directories.patch > index 021e34653b..3c6b3082ea 100644 > --- a/gnu/packages/patches/bash-completion-directories.patch > +++ b/gnu/packages/patches/bash-completion-directories.patch > @@ -10,7 +10,7 @@ This is what this patch does. >=20=20 > --- a/bash_completion > +++ b/bash_completion > -@@ -2016,7 +2016,13 @@ complete -F _minimal '' > +@@ -2016,7 +2016,15 @@ complete -F _minimal '' >=20=20=20 > __load_completion() > { > @@ -19,6 +19,8 @@ This is what this patch does. > + ${BASH_COMPLETION_USER_DIR:-${XDG_DATA_HOME:-$HOME/.local/share= }/bash-completion}/completions > + "$HOME/.guix-profile/share/bash-completion/completions/$base" It seems $base not needed anymore, it's a rudiment from an old version of the patch. I'll remove it. > + "$HOME/.guix-profile/etc/bash_completion.d/$base" > ++ "$HOME/.guix-home/profile/share/bash-completion/completions/$ba= se" > ++ "$HOME/.guix-home/profile/etc/bash_completion.d/$base" > + "/run/current-system/profile/share/bash-completion/completions/= $base" > + "/run/current-system/profile/etc/bash_completion.d/$base" ) > + > > base-commit: 47c11772dfe840a536ed7ec438fe832878f51054 =2D-=20 Best regards, Andrew Tropin --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmMPTEoACgkQIgjSCVjB 3rBNqQ//c3g0a0B4/IH8fNideDyAbiFA2OciLUOjPU1ipMRzrRQKRidO7TixBAnz 8ayrFhsbQ8dnYlcoXo2R1Uj5ACT9VF7xqKMw98JwOmfQnm0t9eME/fOVyvS+2ujx oLtngqoJs/jp7EdyfHJI0Kk9GrepoFFY5rFuZ5LWSar7mvWopqZzRsNQF18Ryw3R csQN4YeWc/qUXVau+ZGtJj26Rr9NcblAqSU/rLydugMyiV81WEXS5wO03fjmYpZC XiESa1wOEmqil9Sdjzwdn5VcgKL4Otfo8cF/uLN/ROUtrTWigiaFdhN9aQv7dudO 2WUgPBquXNO/k08BH35a3GJudryZdni8dSFH1SnNjsTLbYW7QYH8yiikiumpS8K0 YVvw5zjmpWd1Z8b5t+Hd7/xGw011msX4P6cHSoClvDEYZ+BC5/Ocdtrm7BooSlXP ObX4FX2PGazIh1096XiY/JdV4mqK6uVg9Ls2LWmN7ysl+dJv466wqFcHIgQ3GWIa tdnhPac9Bv2tkH7Px5ySPrEZNAIO1YP70ABXx2kNAcgjXXyRBJIqFke3l1cDO3yQ 8rJ6mCS3KVe/2DRqQCcSmu7WfdyNnQbxOnvjgDPnO+Gs+hD44O48xE08odHGT8R9 tTgo4vKAv08jv4nML7Am3YG9qdRedOGY5yERPn/XWQR/FUTpl/g= =eE/9 -----END PGP SIGNATURE----- --=-=-=--