From patchwork Thu Apr 4 22:53:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sent X-Patchwork-Id: 62727 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 7E71027BBE2; Thu, 4 Apr 2024 23:56:18 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 69CC527BBE9 for ; Thu, 4 Apr 2024 23:56:14 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rsVzz-0008Io-E8; Thu, 04 Apr 2024 18:55:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rsVzx-0008Gp-EA for guix-patches@gnu.org; Thu, 04 Apr 2024 18:55:57 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rsVzx-0003lq-52 for guix-patches@gnu.org; Thu, 04 Apr 2024 18:55:57 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rsW02-0001Ji-A9 for guix-patches@gnu.org; Thu, 04 Apr 2024 18:56:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70205] [PATCH] home: services: bash: Move default PS1 prompt to bashrc Resent-From: Richard Sent Original-Sender: "Debbugs-submit" Resent-CC: , guix-patches@gnu.org Resent-Date: Thu, 04 Apr 2024 22:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 70205 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70205@debbugs.gnu.org Cc: Richard Sent , ( , Andrew Tropin , Ludovic =?utf-8?q?Court=C3=A8s?= , Tanguy Le Carrour X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: ( , Andrew Tropin , Ludovic =?utf-8?q?Court=C3=A8s?= , Tanguy Le Carrour Received: via spool by submit@debbugs.gnu.org id=B.17122713434958 (code B ref -1); Thu, 04 Apr 2024 22:56:02 +0000 Received: (at submit) by debbugs.gnu.org; 4 Apr 2024 22:55:43 +0000 Received: from localhost ([127.0.0.1]:34940 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rsVzd-0001Ho-Ml for submit@debbugs.gnu.org; Thu, 04 Apr 2024 18:55:43 -0400 Received: from lists.gnu.org ([2001:470:142::17]:37396) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rsVzX-0001GC-H3 for submit@debbugs.gnu.org; Thu, 04 Apr 2024 18:55:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rsVzM-000835-Ay for guix-patches@gnu.org; Thu, 04 Apr 2024 18:55:20 -0400 Received: from mail-108-mta210.mxroute.com ([136.175.108.210]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rsVzJ-0003GD-St for guix-patches@gnu.org; Thu, 04 Apr 2024 18:55:20 -0400 Received: from filter006.mxroute.com ([136.175.111.2] filter006.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta210.mxroute.com (ZoneMTA) with ESMTPSA id 18eab52cd1d0003bea.001 for (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Thu, 04 Apr 2024 22:55:14 +0000 X-Zone-Loop: e49cfd9206801d735f247663ee3bdd258b53aa3d5109 X-Originating-IP: [136.175.111.2] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=freakingpenguin.com; s=x; h=Content-Transfer-Encoding:MIME-Version: Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=K3UGkiW+AWJLVIXmoeWnKeVIlbyw+WCBZIN+Waz8TZQ=; b=Lp6DRYAGHrlSrpZundAW1QlzAH S050g3zQoz9CB55bgyp8+ZHXzgTWfanAbmZbUu4EcAq+tQ5MtWFtZJb4jKYBYm3A/7RKduSy/0ReE v245PZGgcHt31SdZLzqifqhCczvbUFaOLmJULQK5uJ1pCJAGvjOgM73vtYz/eiB47ag7FdssuLoix jfMA/0TYj2Ny+eLFGBF8HUDOwqgPvN3dHfZZNmokyNislCRr6eH9kXG6mC9fflmf/B8tPTZ11ZxX+ THKE13nYv5SFXtx5Sjfj61QAeqTOwQNnsECfd4JMJ7iXh8hrcc75X+qa9wcKiz5RqE3VcANQMssm7 t18mbu3g==; From: Richard Sent Date: Thu, 4 Apr 2024 18:53:27 -0400 Message-ID: MIME-Version: 1.0 X-Authenticated-Id: richard@freakingpenguin.com Received-SPF: pass client-ip=136.175.108.210; envelope-from=richard@freakingpenguin.com; helo=mail-108-mta210.mxroute.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches Reported in . * home/services/shells.scm (add-bash-configuration): Move default PS1 prompt from .bash_profile to .bashrc. Change-Id: Ic437458ee362cc4aa803a71c9962af866749f59a --- Hi Guix! See the issue mentioned in the commit message for the motivation for this patch. gnu/home/services/shells.scm | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) base-commit: ade6845da6cec99f3bca46faac9b2bad6877817e diff --git a/gnu/home/services/shells.scm b/gnu/home/services/shells.scm index 8fd1668b59..a5b2586dde 100644 --- a/gnu/home/services/shells.scm +++ b/gnu/home/services/shells.scm @@ -415,14 +415,6 @@ (define (add-bash-configuration config) if [ -f ~/.bashrc ]; then source ~/.bashrc; fi " - ;; The host distro might provide a bad 'PS1' default--e.g., not taking - ;; $GUIX_ENVIRONMENT into account. Provide a good default here when - ;; asked to. The default can be overridden below via - ;; 'environment-variables'. - (if (home-bash-configuration-guix-defaults? config) - "PS1='\\u@\\h \\w${GUIX_ENVIRONMENT:+ [env]}\\$ '\n" - "") - (serialize-field 'bash-profile) (serialize-field 'environment-variables))) @@ -430,6 +422,10 @@ (define (add-bash-configuration config) 'bashrc (if (home-bash-configuration-guix-defaults? config) (list (plain-file-content %default-bashrc) + ;; The host distro might provide a bad 'PS1' + ;; default--e.g., not taking $GUIX_ENVIRONMENT into + ;; account. Provide a good default here when asked. + "PS1='\\u@\\h \\w${GUIX_ENVIRONMENT:+ [env]}\\$ '" (serialize-field 'aliases)) (list (serialize-field 'aliases)))) (file-if-not-empty 'bash-logout)))))