From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id OHd9HmkPD2N0MgEAbAwnHQ (envelope-from ) for ; Wed, 31 Aug 2022 09:36:09 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id OO2THmkPD2MJpAAA9RJhRA (envelope-from ) for ; Wed, 31 Aug 2022 09:36: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 382FC100FE for ; Wed, 31 Aug 2022 09:36:09 +0200 (CEST) Received: from localhost ([::1]:56410 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oTIGe-0002K0-0m for larch@yhetil.org; Wed, 31 Aug 2022 03:36:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40792) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oTIGZ-0002Jm-9d for bug-guix@gnu.org; Wed, 31 Aug 2022 03:36:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:48346) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oTIGZ-0006fF-16 for bug-guix@gnu.org; Wed, 31 Aug 2022 03:36:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oTIGY-0003Ul-Fp for bug-guix@gnu.org; Wed, 31 Aug 2022 03:36: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 07:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 57498 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 57498@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.166193132413390 (code B ref -1); Wed, 31 Aug 2022 07:36:02 +0000 Received: (at submit) by debbugs.gnu.org; 31 Aug 2022 07:35:24 +0000 Received: from localhost ([127.0.0.1]:38095 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oTIFv-0003Tt-Hu for submit@debbugs.gnu.org; Wed, 31 Aug 2022 03:35:23 -0400 Received: from lists.gnu.org ([209.51.188.17]:46584) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oTIFq-0003Tj-KJ for submit@debbugs.gnu.org; Wed, 31 Aug 2022 03:35:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39680) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oTIFq-0002BC-FL for bug-guix@gnu.org; Wed, 31 Aug 2022 03:35:18 -0400 Received: from mx1.polytechnique.org ([129.104.30.34]:47896) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oTIFn-0006Jy-91 for bug-guix@gnu.org; Wed, 31 Aug 2022 03:35:17 -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 EC24E5648F9 for ; Wed, 31 Aug 2022 09:35:08 +0200 (CEST) Received: from maze by ubik with local (Exim 4.95) (envelope-from ) id 1oTIFa-0007Mi-PJ for bug-guix@gnu.org; Wed, 31 Aug 2022 15:35:02 +0800 Date: Wed, 31 Aug 2022 15:35:02 +0800 From: Maze Message-ID: <20220831073502.ru6dye2wbgc6vrbu@ubik.pkbd.org> X-PGP-Key: http://data.pkbd.org/pgp/maze/pubkey.asc MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline X-AV-Checked: ClamAV using ClamSMTP at svoboda.polytechnique.org (Wed Aug 31 09:35:09 2022 +0200 (CEST)) Received-SPF: pass client-ip=129.104.30.34; envelope-from=SRS0=WkIY=ZD=ubik.pkbd.org=maze@bounces.m4x.org; helo=mx1.polytechnique.org X-Spam_score_int: -39 X-Spam_score: -4.0 X-Spam_bar: ---- X-Spam_report: (-4.0 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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=1661931369; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:list-id:list-help:list-unsubscribe:list-subscribe: list-post; bh=mefZXHRsaw3dD4V+3Vz/P8bpf9lo1z57v/iPnZOkkl0=; b=LsA1m2rpVa6dxLEDxHHDeq22VYM6U2c6knExQXNOhW+VVewTy6jBix0n2AwvHWj9A334J/ qh3Hf2uEWy15vzY6mEr8k4GOCuaxf95ZrB48UblANB5aFOOAsS4ZP/dEJzgVhKcWHilJw4 uI4ZYT2GoMHx9cC7EulqTN7mn2XgfL5cO0EAOiWz0V6CIT0RNybTKSYelIObQ4Y7JWKU/8 P8lMqAtEKOEtnYkI2coHBGwPsNqJewv3ORR8ajMCip9sNqfOpZjA/LZxYdpugn/VGqVRU8 6+GarfsEQBvK3kwjXlZRtePLBuO8ZclFZifxUe/xGwSWMS3mE9Mg2kvmYW4NFg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1661931369; a=rsa-sha256; cv=none; b=RiyJGiUOaxzse4Xl27P+1neujsv6KD6fMs9Ci3wIL27fYw96ut4hY5NYxS+YG7B0QCNUE9 N9ZyWf0PFAiY3L7p2NveO+pD2AJlaJZsnmi1gI9Z0mXUMdoI5vJGPJ799PEsE44Jda6EFw zzC406PaOLTdaVVT4GWjd71d1oefVXoJhhzp7RaRBAiItP3TKeLGoAXrl7/mgcNMimSwvt LM33VoRIy+E6fkuFkWEZVsh3M/QRIZIIvUNIklpG+f+UtT5/KMuVNj/wZNS+/vBxLIISlC RvGSDGuUiVduHWascIuWxRHuk2k7jaZoRXdLNSo1pGlfrphntQmlTzJ4VJ9wTQ== 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.69 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: 382FC100FE X-Spam-Score: -1.69 X-Migadu-Scanner: scn1.migadu.com X-TUID: Ywa/D+KbOKKk 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. --- 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" + "$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 -- 2.36.1