From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 4M1jNPPghV9mbgAA0tVLHw (envelope-from ) for ; Tue, 13 Oct 2020 17:16:35 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id yOElMPPghV9AUwAAbx9fmQ (envelope-from ) for ; Tue, 13 Oct 2020 17:16:35 +0000 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 67A2F9401DD for ; Tue, 13 Oct 2020 17:16:35 +0000 (UTC) Received: from localhost ([::1]:40150 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kSNuc-00045q-B6 for larch@yhetil.org; Tue, 13 Oct 2020 13:16:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35580) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kSNrE-0001Iw-G6 for guix-patches@gnu.org; Tue, 13 Oct 2020 13:13:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:37154) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kSNrC-00009h-Tc for guix-patches@gnu.org; Tue, 13 Oct 2020 13:13:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kSNrC-0005tf-PB for guix-patches@gnu.org; Tue, 13 Oct 2020 13:13:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#43769] [PATCH v3 1/2] guix-install.sh: Add symbolic links for supported shell completions. Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 13 Oct 2020 17:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43769 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 43769@debbugs.gnu.org Cc: ludo@gnu.org, me@tobias.gr, zimoun Received: via spool by 43769-submit@debbugs.gnu.org id=B43769.160260914622610 (code B ref 43769); Tue, 13 Oct 2020 17:13:02 +0000 Received: (at 43769) by debbugs.gnu.org; 13 Oct 2020 17:12:26 +0000 Received: from localhost ([127.0.0.1]:48699 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kSNqc-0005sb-8q for submit@debbugs.gnu.org; Tue, 13 Oct 2020 13:12:26 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:43020) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kSNqX-0005ry-To for 43769@debbugs.gnu.org; Tue, 13 Oct 2020 13:12:22 -0400 Received: by mail-wr1-f67.google.com with SMTP id g12so147673wrp.10 for <43769@debbugs.gnu.org>; Tue, 13 Oct 2020 10:12:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=DWUiuVqzpQJYSN8cadMAUyzAil+CUrnkj8Rai9dt5eM=; b=IEiYMEEHOIen3tkpc8ncOlMn3yJVJ4TS7aX+mIFl2ZAYUlNCthM/+PoE7EN3xpjCZs NfdsmTyIfDL7lveFv1lNZCp/8ZtcXu6drndXqUkL2plWJ16pvOkOHmGzDwsmObNYO3rr v0plW8CVIc8+Gr8AC/qu4T51ptMVDdV3ffyg5aNsqHzCRKhIms1diK9VP0LQAR88jqB6 C9B/Lro4GNDwJZSLKOl+mbS4KRl2GBA5zgloIbboogQfY/n1D/zcClbQgg1weje3bm7+ 4bumdZqzUYsbpeqVq90/cE71Wls+ORRhagpWEwAbNnKsNzYLNEQIr5+d3UPfkS0a/xtu jlQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=DWUiuVqzpQJYSN8cadMAUyzAil+CUrnkj8Rai9dt5eM=; b=aObDrleWVh7srZVu4eWnlGr8XwiAKQgqHKHbfLVMr8GrwSAxAsWJCUjrcfZ/Gt3eDu /D0aa6vL+DixK2zCa37Mh/nBZMQDvFtODvkOi4d/jAPbOoLaJPyR9h6r+boLwBc5RAf3 qBARWlJqmO5SyqS0g+znAgn6y52c8F3ySItY/yEXtc7YoqhIont1I9MmzdVu3kH+cTb9 y2Ofq0C788tq3nXDehPmWuw4LpAW12vyj7L707FjkRp0uToVjEgMRXpTBD6NYyjiIiny nnWnLOxFscXFiuUsUrfKw/jl5VpHvUSNUM9wn5ZtZ+vVXVesB8opKZ62xvPBgVHCK4c/ Ddkg== X-Gm-Message-State: AOAM5324TEU4l3DBgLBZROJ/ol4jM02MUf7c+AVz4nn+HHsz8lkXKPp/ qeksaPfUZgzlRFfbxakFbGyk9wTl/IE= X-Google-Smtp-Source: ABdhPJzHYgagTdNapBOhbpuQQpenyjpsxWriBRzk7BKWZ3HZ1P9zodD00XHSh1DCb2ATbT3OXvtQ+g== X-Received: by 2002:adf:de89:: with SMTP id w9mr760220wrl.212.1602609136059; Tue, 13 Oct 2020 10:12:16 -0700 (PDT) Received: from lili.univ-paris-diderot.fr ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id o4sm293543wrv.8.2020.10.13.10.12.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Oct 2020 10:12:15 -0700 (PDT) From: zimoun Date: Tue, 13 Oct 2020 19:12:04 +0200 Message-Id: <20201013171204.14708-2-zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201013171204.14708-1-zimon.toutoune@gmail.com> References: <20201013171204.14708-1-zimon.toutoune@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=gmail.com header.s=20161025 header.b=IEiYMEEH; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: 1.59 X-TUID: PgZ5x/+wmeqD Fixes . * etc/guix-install.sh (sys_create_shell_completion): New function to add system wide all the symlinks for supported shell completions. --- etc/guix-install.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/etc/guix-install.sh b/etc/guix-install.sh index eb7205a261..f51a1b653f 100755 --- a/etc/guix-install.sh +++ b/etc/guix-install.sh @@ -5,6 +5,7 @@ # Copyright © 2018 Efraim Flashner # Copyright © 2019, 2020 Tobias Geerinckx-Rice # Copyright © 2020 Morgan Smith +# Copyright © 2020 Simon Tournier # # This file is part of GNU Guix. # @@ -459,6 +460,26 @@ export XDG_DATA_DIRS="$GUIX_PROFILE/share:${XDG_DATA_DIRS:-/usr/local/share/:/us EOF } +sys_create_shell_completion() +{ # Symlink supported shell completions system-wide + + var_guix=/var/guix/profiles/per-user/root/current-guix + bash_completion=/etc/bash_completion.d + zsh_completion=/usr/share/zsh/site-functions + fish_completion=/usr/share/fish/vendor_completions.d + + { # Just in case + for dir_shell in $bash_completion $zsh_completion $fish_completion; do + [ -d "$dir_shell" ] || mkdir -p $dir_shell + done; + + ln -sf ${var_guix}/etc/bash_completion.d/* "$bash_completion"; + ln -sf ${var_guix}/share/zsh/site-functions/* "$zsh_completion"; + ln -sf ${var_guix}/share/fish/vendor_completions.d/* "$fish_completion"; } && + _msg "${PAS}installed shell completion" +} + + welcome() { cat<<"EOF" @@ -516,6 +537,7 @@ main() sys_enable_guix_daemon sys_authorize_build_farms sys_create_init_profile + sys_create_shell_completion _msg "${INF}cleaning up ${tmp_path}" rm -r "${tmp_path}" -- 2.28.0