From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 ULpnOHFSD2MGqQAAbAwnHQ (envelope-from ) for ; Wed, 31 Aug 2022 14:22:09 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 2CFaOHFSD2N3EgEAauVa8A (envelope-from ) for ; Wed, 31 Aug 2022 14:22:09 +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 8AF6427499 for ; Wed, 31 Aug 2022 14:22:08 +0200 (CEST) Received: from localhost ([::1]:38490 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oTMjP-0003dD-9c for larch@yhetil.org; Wed, 31 Aug 2022 08:22:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43544) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oTMjL-0003cW-3G for bug-guix@gnu.org; Wed, 31 Aug 2022 08:22:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:48711) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oTMjK-00048b-Jg for bug-guix@gnu.org; Wed, 31 Aug 2022 08:22:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oTMjK-0000to-6N for bug-guix@gnu.org; Wed, 31 Aug 2022 08:22:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#57498: bash-completion completion functions not loaded when using guix home Resent-From: Maze Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 31 Aug 2022 12:22: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: Andrew Tropin Cc: 57498@debbugs.gnu.org, Ludovic =?UTF-8?Q?Court=C3=A8s?= , Tobias Geerinckx-Rice , Efraim Flashner Received: via spool by 57498-submit@debbugs.gnu.org id=B57498.16619484963423 (code B ref 57498); Wed, 31 Aug 2022 12:22:02 +0000 Received: (at 57498) by debbugs.gnu.org; 31 Aug 2022 12:21:36 +0000 Received: from localhost ([127.0.0.1]:38460 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oTMiu-0000t9-4R for submit@debbugs.gnu.org; Wed, 31 Aug 2022 08:21:36 -0400 Received: from mx1.polytechnique.org ([129.104.30.34]:58572) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oTMip-0000sy-N2 for 57498@debbugs.gnu.org; Wed, 31 Aug 2022 08:21:34 -0400 Received: from ubik (unknown [199.167.29.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ssl.polytechnique.org (Postfix) with ESMTPSA id 5A466564673; Wed, 31 Aug 2022 14:21:29 +0200 (CEST) Received: from maze by ubik with local (Exim 4.95) (envelope-from ) id 1oTMig-000426-QF; Wed, 31 Aug 2022 20:21:22 +0800 Date: Wed, 31 Aug 2022 20:21:22 +0800 From: Maze Message-ID: <20220831122122.wsyvyxm56tdt7zkm@ubik.pkbd.org> X-PGP-Key: http://data.pkbd.org/pgp/maze/pubkey.asc References: <20220831073502.ru6dye2wbgc6vrbu@ubik.pkbd.org> <87wnaok4ol.fsf@trop.in> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <87wnaok4ol.fsf@trop.in> X-AV-Checked: ClamAV using ClamSMTP at svoboda.polytechnique.org (Wed Aug 31 14:21:30 2022 +0200 (CEST)) 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=1661948529; 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; bh=vRzdOovqyOxfgRgFZSgveXe+k8FaXIYsPyqE8lxdOTs=; b=B2IYK9JsYAD0E6C5gm/Zn48PcjoIfmvwZaMkwQq9wf1DEqBOaPVfDn34HtNnubtwMNE3M4 W0G2U4uZY6v3e1kvaAPkH07GkhblvWS7TjOI0vIU9H06oZi6pnQUwu2+ERVo67gfbwGHpZ yB/RGJUpGeom8lhGDfPwYNb2d7r7tq0HovDaEa3licfHUoxpy1++EkyrgNTFXbg6o7va1z HqAb6ScbtJfbIwg1W7jCJW/rzJinHizDj43yCcmdwUra375v+eT/abieNaxmhATamK9Grx MXHYNmzX/Kz2UV/0HpWXORMr8Le9WbuaIj9kXDl2ZD+whJceCn6CO1D7THQIew== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1661948529; a=rsa-sha256; cv=none; b=GMPq0E4UwNO+rhMzf9iksIKtrY9m7O2vM86lWsGPzZrQoVPQsVgJToKp01mc6wEijnSlrt O+j21YVu/1+mFnDifxlwU1z8ZWw0UvW9VK44YmHFNSgaDGDNYZ9Xhucb53bbXCJd9RYmBj rNS1T9ETAkbkkBgWsv5VIYCNZw6rh1svsrOBq4lLxX2oETKmNUGpguhaExdMIstf1/DsR+ 0sBPfJ6du1Hr1ntmhqodXH95yLk7y4T6ytFWXmy464JxMA6h2zMYf3DCVycQJYuMaPh9Ba dicUjMZRDfVs9dISQ54dPQHeQO6Mzs7E4C2arMGdnBAynzN4IimF4IjxekYxng== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; 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.48 Authentication-Results: aspmx1.migadu.com; dkim=none; 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: 8AF6427499 X-Spam-Score: -1.48 X-Migadu-Scanner: scn1.migadu.com X-TUID: 9efiLX3l+CsO Thanks for the information and right, it is easy to workaround once figured out. Next time I find a little thing of this sort I'll be sure to check on the core-updates branch. On Wednesday 31 August 2022 at 02:55:54PM, Andrew Tropin has written: > 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 found 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. > > > > 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. > > > > --- a/bash_completion > > +++ b/bash_completion > > -@@ -2016,7 +2016,13 @@ complete -F _minimal '' > > +@@ -2016,7 +2016,15 @@ complete -F _minimal '' > > > > __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/$base" > > ++ "$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 > > > -- > Best regards, > Andrew Tropin -- Maze