From unknown Fri Sep 05 07:33:11 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#51543 <51543@debbugs.gnu.org> To: bug#51543 <51543@debbugs.gnu.org> Subject: Status: [PATCH 0/2] Some improvements to the Bash home service Reply-To: bug#51543 <51543@debbugs.gnu.org> Date: Fri, 05 Sep 2025 14:33:11 +0000 retitle 51543 [PATCH 0/2] Some improvements to the Bash home service reassign 51543 guix-patches submitter 51543 Xinglu Chen severity 51543 normal tag 51543 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 01 05:43:28 2021 Received: (at submit) by debbugs.gnu.org; 1 Nov 2021 09:43:28 +0000 Received: from localhost ([127.0.0.1]:33723 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mhTqi-000088-Bh for submit@debbugs.gnu.org; Mon, 01 Nov 2021 05:43:28 -0400 Received: from lists.gnu.org ([209.51.188.17]:56768) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mhTqg-00007z-RB for submit@debbugs.gnu.org; Mon, 01 Nov 2021 05:43:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52336) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mhTqg-0007nY-Ce for guix-patches@gnu.org; Mon, 01 Nov 2021 05:43:26 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:49348 helo=mail.yoctocell.xyz) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mhTqe-0004c6-BN for guix-patches@gnu.org; Mon, 01 Nov 2021 05:43:26 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1635759799; bh=CAiKO55XR6LF6cUwhviQR0h3256UkSdrPict3Cgc2V4=; h=From:To:Subject:Date; b=P8nmvDwp+ZB7fYn1XnkPw5yA4cQEsX6wcAc3Ye58Th31Kad8nmF3imzIVKMEbhSxI aD4CNAonJipmZt8SnX7nx0+N3WJzT1a/V1n16cVlV5gpy3pxsO5g7nDcNn9l7avamy lPBIV8esdSNVeexFrXNtW9jFO4/QqAJmEGe1HpYY= To: guix-patches@gnu.org Subject: [PATCH 0/2] Some improvements to the Bash home service Message-Id: Date: Mon, 01 Nov 2021 10:43:18 +0100 MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Received-SPF: pass client-ip=87.96.130.155; envelope-from=public@yoctocell.xyz; helo=mail.yoctocell.xyz X-Spam_score_int: 10 X-Spam_score: 1.0 X-Spam_bar: + X-Spam_report: (1.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FROM_SUSPICIOUS_NTLD=0.001, FROM_SUSPICIOUS_NTLD_FP=1.824, PDS_OTHER_BAD_TLD=0.001, PDS_RDNS_DYNAMIC_FP=0.001, RDNS_DYNAMIC=0.982, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, TO_NO_BRKTS_DYNIP=0.248 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.7 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: This series adds an ‘aliases’ field to the Bash home service, and documents the ‘home-bash-extension’ configuration record in the manual. Xinglu Chen (2): home: services: bash: Add ‘aliases’ field. doc: Document ‘home-bash-extension’ configuration record. Content analysis details: (1.7 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [209.51.188.17 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.51.188.17 listed in wl.mailspike.net] 0.5 FROM_SUSPICIOUS_NTLD_FP From abused NTLD 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.2 (/) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable This series adds an =E2=80=98aliases=E2=80=99 field to the Bash home servic= e, and documents the =E2=80=98home-bash-extension=E2=80=99 configuration record in= the manual. Xinglu Chen (2): home: services: bash: Add =E2=80=98aliases=E2=80=99 field. doc: Document =E2=80=98home-bash-extension=E2=80=99 configuration record. doc/guix.texi | 38 ++++++++++++++ gnu/home/services/shells.scm | 99 ++++++++++++++++++++++++++---------- guix/scripts/home/import.scm | 24 +++++++++ 3 files changed, 134 insertions(+), 27 deletions(-) base-commit: 1a80b8909a521b91d30649a011b0257d0fadc18c =2D-=20 2.33.0 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmF/trYVHHB1YmxpY0B5 b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5Jl8P/AldbcXXM5GLsfl5E382+hwiGr7L b5+EAFkSgvr1qSdDIsVQqW7Zax0USHm9HGkwTXLFcZEo3+WQJdbN5yFoM+H7tnOD uYuBOFTnoBK3iyHG59oNZH/pLjzO8/SATuGp+naXwsK75eV+ypVc5Mi7iqFAj1HK VsRxiaDdjCwQTaQg4TfLEw9Cu2cfcq4SMnaEZlJYJeLZF5dvK1DxUNygmf2I4rPu JsfwJSVa3KuRFD29jBl5YB4j9YOmZkyUZKm81VO4LZWBhJ8fds2xQKaN3851/H1I EX6MDgDDPOl8g+096cwqKA1Vk5Xr2F/bdq9tQHYBRhsYXiw7rPw8R3f56fgm1heR oFtXdeIUg53gHVeclctMl7ZCi4NJpRIPiRD+JzTfklPmd72r800z1lPhxVWyYYg8 Gb89exh6d65bt5WfYQ/g1ZZoOd66dfwJOqgieQDpIi3j/peBIX3d5KGJrJJXv96x EmGOIoF67yrLEN4th5eq74IpZwv5kU+3tz27C+BXiXLMKblqrEJZWml2pWRuXVqB px3qmX08tJPFKgEcwBivpDGDY466rc4wl593RLgz3NDYpm5LzwEyrTqwxX4gWCh6 nHjT1H8M8yNlcFqxHp3zB0g11s2jaQDANl6Qalcj873aWeknLSPdc52QrgQolhBf HcG99TyZITWYmD4s =/Tc6 -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 01 05:45:40 2021 Received: (at 51543) by debbugs.gnu.org; 1 Nov 2021 09:45:40 +0000 Received: from localhost ([127.0.0.1]:33728 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mhTsp-0000C5-MI for submit@debbugs.gnu.org; Mon, 01 Nov 2021 05:45:40 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:57986 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mhTso-0000Br-8l for 51543@debbugs.gnu.org; Mon, 01 Nov 2021 05:45:38 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1635759932; bh=7H+iBW9fJrRBVeHOMANQPr6F0L/UdGEzCmECI18VOMI=; h=From:To:Subject:In-Reply-To:References:Date; b=h8Gb93/vMmU/Ay/OaoulLRFBm7wMzpg7CF0tfD5EXVMJY1Am9wPfKb+erGkLoZJxc KL0nADxrftsBivbFxMeWF7PE3l425IkySZ2hLJmQW2p6dn7SrAjiokgKq28rBbS/ZL ciZNO1tLhzcJq4G+dev5tcB2gvZxLtA/w7gk2veQ= To: 51543@debbugs.gnu.org Subject: [PATCH 1/2] =?UTF-8?q?home:=20services:=20bash:=20Add=20=E2=80=98?= =?UTF-8?q?aliases=E2=80=99=20field.?= In-Reply-To: References: Message-Id: <231301123d2fe00e6c65e94ec45ffc906bf95ee1.1635759704.git.public@yoctocell.xyz> Date: Mon, 01 Nov 2021 10:45:32 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 2.9 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: * doc/guix.texi (Shells Home Services): Document it. * gnu/home/services/shells.scm (bash-serialize-aliases): New procedure. (home-bash-configuration, home-bash-extension): Add ‘aliases’ field. (h [...] Content analysis details: (2.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS 0.0 PDS_RDNS_DYNAMIC_FP RDNS_DYNAMIC with FP steps X-Debbugs-Envelope-To: 51543 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.9 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: * doc/guix.texi (Shells Home Services): Document it. * gnu/home/services/shells.scm (bash-serialize-aliases): New procedure. (home-bash-configuration, home-bash-extension): Add ‘aliases’ field. (h [...] Content analysis details: (1.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager 0.0 PDS_RDNS_DYNAMIC_FP RDNS_DYNAMIC with FP steps * doc/guix.texi (Shells Home Services): Document it. * gnu/home/services/shells.scm (bash-serialize-aliases): New procedure. (home-bash-configuration, home-bash-extension): Add =E2=80=98aliases=E2=80= =99 field. (home-bash-extensions): Adjust accordingly. * guix/scripts/home/import.scm (generate-bash-configuration+modules): Popul= ate the =E2=80=98alias=E2=80=99 field. --- doc/guix.texi | 14 ++++++ gnu/home/services/shells.scm | 85 ++++++++++++++++++++++++++---------- guix/scripts/home/import.scm | 24 ++++++++++ 3 files changed, 100 insertions(+), 23 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index ea1973f02c..f7312a5b30 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -36173,6 +36173,20 @@ @item @code{environment-variables} (default: @code{()}) (type: alist) Association list of environment variables to set for the Bash session. =20 +@item @code{aliases} (default: @code{()}) (type: alist) +Association list of aliases to set for the Bash session. The alias will +automatically be quoted, so something line this: + +@lisp +'((\"ls\" . \"ls -alF\")) +@end lisp + +turns into + +@example +alias ls=3D\"ls -alF\" +@end example + @item @code{bash-profile} (default: @code{()}) (type: text-config) List of file-like objects, which will be added to @file{.bash_profile}. Used for executing user's commands at start of login shell (In most diff --git a/gnu/home/services/shells.scm b/gnu/home/services/shells.scm index e2730967b2..bd1595a041 100644 --- a/gnu/home/services/shells.scm +++ b/gnu/home/services/shells.scm @@ -305,6 +305,18 @@ (define home-zsh-service-type ;;; Bash. ;;; =20 +(define (bash-serialize-aliases field-name val) + #~(string-append + #$@(map + (match-lambda + ((key . #f) + "") + ((key . #t) + #~(string-append "alias " #$key "\n")) + ((key . value) + #~(string-append "alias " #$key "=3D\"" #$value "\"\n"))) + val))) + (define-configuration home-bash-configuration (package (package bash) @@ -317,6 +329,21 @@ (define-configuration home-bash-configuration (alist '()) "Association list of environment variables to set for the Bash session." serialize-posix-env-vars) + (aliases + (alist '()) + "Association list of aliases to set for the Bash session. The alias wi= ll +automatically be quoted, so something line this: + +@lisp +'((\"ls\" . \"ls -alF\")) +@end lisp + +turns into + +@example +alias ls=3D\"ls -alF\" +@end example" + bash-serialize-aliases) (bash-profile (text-config '()) "List of file-like objects, which will be added to @file{.bash_profile}. @@ -387,10 +414,11 @@ (define* (file-if-not-empty field #:optional (extra-c= ontent #f)) (if (or extra-content (not (null? ((configuration-field-getter field-obj) config))= )) `(,(object->snake-case-string file-name) - ,(mixed-text-file + ,(apply mixed-text-file (object->snake-case-string file-name) - (if extra-content extra-content "") - (serialize-field field))) + (append + (if extra-content extra-content '()) + (list (serialize-field field))))) '()))) =20 (filter @@ -413,8 +441,9 @@ (define* (file-if-not-empty field #:optional (extra-con= tent #f)) ,@(list (file-if-not-empty 'bashrc (if (home-bash-configuration-guix-defaults? config) - guix-bashrc - #f)) + (list guix-bashrc + (serialize-field 'aliases)) + (list (serialize-field 'alises)))) (file-if-not-empty 'bash-logout))))) =20 (define (add-bash-packages config) @@ -424,6 +453,9 @@ (define-configuration/no-serialization home-bash-extens= ion (environment-variables (alist '()) "Association list of environment variables to set.") + (aliases + (alist '()) + "Association list of aliases to set.") (bash-profile (text-config '()) "List of file-like objects.") @@ -435,24 +467,31 @@ (define-configuration/no-serialization home-bash-exte= nsion "List of file-like objects.")) =20 (define (home-bash-extensions original-config extension-configs) - (home-bash-configuration - (inherit original-config) - (environment-variables - (append (home-bash-configuration-environment-variables original-config) - (append-map - home-bash-extension-environment-variables extension-configs))) - (bash-profile - (append (home-bash-configuration-bash-profile original-config) - (append-map - home-bash-extension-bash-profile extension-configs))) - (bashrc - (append (home-bash-configuration-bashrc original-config) - (append-map - home-bash-extension-bashrc extension-configs))) - (bash-logout - (append (home-bash-configuration-bash-logout original-config) - (append-map - home-bash-extension-bash-logout extension-configs))))) + (match original-config + (($ _ _ _ environment-variables aliases + bash-profile bashrc bash-logout) + (home-bash-configuration + (inherit original-config) + (environment-variables + (append environment-variables + (append-map + home-bash-extension-environment-variables extension-config= s))) + (aliases + (append aliases + (append-map + home-bash-extension-aliases extension-configs))) + (bash-profile + (append bash-profile + (append-map + home-bash-extension-bash-profile extension-configs))) + (bashrc + (append bashrc + (append-map + home-bash-extension-bashrc extension-configs))) + (bash-logout + (append bash-logout + (append-map + home-bash-extension-bash-logout extension-configs))))))) =20 (define home-bash-service-type (service-type (name 'home-bash) diff --git a/guix/scripts/home/import.scm b/guix/scripts/home/import.scm index 7a7712dd96..68420ff7f9 100644 --- a/guix/scripts/home/import.scm +++ b/guix/scripts/home/import.scm @@ -27,6 +27,9 @@ (define-module (guix scripts home import) #:use-module (gnu packages) #:use-module (ice-9 match) #:use-module (ice-9 pretty-print) + #:use-module (ice-9 rdelim) + #:use-module (ice-9 regex) + #:use-module (ice-9 popen) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) #:export (import-manifest @@ -56,11 +59,32 @@ (define (generate-bash-configuration+modules destinatio= n-directory) (define (destination-append path) (string-append destination-directory "/" path)) =20 + (define (bash-alias->pair line) + (if (string-prefix? "alias" (pk line)) + (let ((matched (string-match "alias (.+)=3D\"?'?([^\"']+)\"?'?" li= ne))) + `(,(match:substring matched 1) . ,(match:substring matched 2))) + '())) +=20=20 + (define (parse-aliases input) + (let loop ((line (read-line input)) + (result '())) + (if (eof-object? line) + (reverse result) + (loop (read-line input) + (cons (bash-alias->pair line) result))))) + (let ((rc (destination-append ".bashrc")) (profile (destination-append ".bash_profile")) (logout (destination-append ".bash_logout"))) `((service home-bash-service-type (home-bash-configuration + ,@(if (file-exists? rc) + `((aliases + ',(let* ((port (open-pipe* OPEN_READ "bash" "-i" = "-c" "alias")) + (alist (parse-aliases port))) + (close-port port) + (filter (negate null?) alist)))) + '()) ,@(if (file-exists? rc) `((bashrc (list (local-file ,rc --=20 2.33.0 From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 01 05:46:02 2021 Received: (at 51543) by debbugs.gnu.org; 1 Nov 2021 09:46:02 +0000 Received: from localhost ([127.0.0.1]:33732 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mhTtC-0000Cz-6i for submit@debbugs.gnu.org; Mon, 01 Nov 2021 05:46:02 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:58052 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mhTt9-0000CT-Ts for 51543@debbugs.gnu.org; Mon, 01 Nov 2021 05:46:00 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1635759954; bh=+71Bg1Xx4QPpgh8bQQTqrzvtJy1zVPyYARoenLbfqr8=; h=From:To:Subject:In-Reply-To:References:Date; b=YghpnZ7DFovn62j7db9TWVdDxmEcLFTLCH/0NHikIKHF6roW4qey2cjJWZ+nYom2I mMeXFDs6i5jehxoH2KA5jVO7AOWUkD6g8l5VzPRGP1QZbcvlw8iv3KVMdN9gNgMHL8 aUS/n2q+s72nNJAM0ZOqaP/G/pcxcNOitovuoWmk= To: 51543@debbugs.gnu.org Subject: [PATCH 2/2] =?UTF-8?q?doc:=20Document=20=E2=80=98home-bash-extens?= =?UTF-8?q?ion=E2=80=99=20configuration=20record.?= In-Reply-To: References: Message-Id: Date: Mon, 01 Nov 2021 10:45:53 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 2.9 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: * doc/guix.texi (Shells Home Services): Document ‘home-bash-extension’ configuration record. * gnu/home/services/shells.scm (generate-home-bash-documentation): Extract docstrings from ‘home-bash [...] Content analysis details: (2.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS 0.0 PDS_RDNS_DYNAMIC_FP RDNS_DYNAMIC with FP steps X-Debbugs-Envelope-To: 51543 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.9 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: * doc/guix.texi (Shells Home Services): Document ‘home-bash-extension’ configuration record. * gnu/home/services/shells.scm (generate-home-bash-documentation): Extract docstrings from ‘home-bash [...] Content analysis details: (1.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager 0.0 PDS_RDNS_DYNAMIC_FP RDNS_DYNAMIC with FP steps * doc/guix.texi (Shells Home Services): Document =E2=80=98home-bash-extensi= on=E2=80=99 configuration record. * gnu/home/services/shells.scm (generate-home-bash-documentation): Extract docstrings from =E2=80=98home-bash-extension=E2=80=99. Fixes: --- doc/guix.texi | 24 ++++++++++++++++++++++++ gnu/home/services/shells.scm | 14 ++++++++++---- 2 files changed, 34 insertions(+), 4 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index f7312a5b30..a3b440f5c9 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -36206,7 +36206,31 @@ process for example). =20 @end table +@end deftp + +To extend the Bash service, one has to use a @code{home-bash-extension}, +which contains mostly the same fields as @code{home-bash-configuration}. + +@deftp {Data Type} home-bash-extension +Available @code{home-bash-extension} fields are: + +@table @asis +@item @code{environment-variables} (default: @code{()}) (type: alist) +Association list of environment variables to set. + +@item @code{aliases} (default: @code{()}) (type: alist) +Association list of aliases to set. =20 +@item @code{bash-profile} (default: @code{()}) (type: text-config) +List of file-like objects. + +@item @code{bashrc} (default: @code{()}) (type: text-config) +List of file-like objects. + +@item @code{bash-logout} (default: @code{()}) (type: text-config) +List of file-like objects. + +@end table @end deftp =20 @subsubheading Zsh Home Service diff --git a/gnu/home/services/shells.scm b/gnu/home/services/shells.scm index bd1595a041..9eeb7153e3 100644 --- a/gnu/home/services/shells.scm +++ b/gnu/home/services/shells.scm @@ -648,10 +648,16 @@ (define (generate-home-shell-profile-documentation) 'home-shell-profile-configuration)) =20 (define (generate-home-bash-documentation) - (generate-documentation - `((home-bash-configuration - ,home-bash-configuration-fields)) - 'home-bash-configuration)) + (string-append + (generate-documentation + `((home-bash-configuration + ,home-bash-configuration-fields)) + 'home-bash-configuration) + "\n\n" + (generate-documentation + `((home-bash-extension + ,home-bash-extension-fields)) + 'home-bash-extension))) =20 (define (generate-home-zsh-documentation) (generate-documentation --=20 2.33.0 From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 01 06:45:11 2021 Received: (at 51543) by debbugs.gnu.org; 1 Nov 2021 10:45:12 +0000 Received: from localhost ([127.0.0.1]:33799 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mhUoR-0001r9-LU for submit@debbugs.gnu.org; Mon, 01 Nov 2021 06:45:11 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:37601) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mhUoO-0001qs-4A for 51543@debbugs.gnu.org; Mon, 01 Nov 2021 06:45:10 -0400 Received: by mail-wr1-f68.google.com with SMTP id b12so23060586wrh.4 for <51543@debbugs.gnu.org>; Mon, 01 Nov 2021 03:45:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=f7OyVp6ClhX977cU9V187NffMETcfhs9yUFjatgrh3Y=; b=T+NTSlCbBb1LbVkdNcDvkG9g68AOmQIrkkIQLQdM3lCJAjzyj/BHtiRqJAt0JS4dYi AHRdoPlXjKjjFdU8wm4kki80E580AOPniLrUjXpQpGBJi5Z8+BVE9jkG3numwNy/JrkA 3f6tHPW8HSYm5YvDOp3kj9ExL3w8Q8WYb+TYpwj5gPd47x5ujlp9sklfb4DtCZqVmOaK KBK3RPFf4W8f+yVQAto66Xaxax/CyIFJ0SE6QuOnvfGMkLwwMgz9bxz39ZewR7soJZNE MrQGAbZlz/fLGGOinp/lx5P1ALHp/kX9uT9OxRtL2aR0omfqqp9DpIH/mjTxnvlxwRkx jP0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=f7OyVp6ClhX977cU9V187NffMETcfhs9yUFjatgrh3Y=; b=dlt6TgYQagibWiiV6p8LIlOEwbTT1nSVfOw70p1FJrpDQRIzMIeE9/d3QwK9ErHhUe jiQUGAOUhn/eLRl+jrN+V8ypzi2bBw+YEIw/+2T62BAgHtyh/5IvSfk5jTw6MCgNDyaU kY1bcIdI6xHOdhB7euIJPh7wSq47tTAFdC13eAiCeZ4ShfHywhQVypjjMie5lAdM7T7o mmXhlY0nDleH7VzXrveisgxyEoeQAEDwlMKU2Vvy+Ig+Kn8YGzI64KpztO0cZQMxCsAf UdkH4jHev0eJXs8vkNcnpmvSplZWhvNMic5g9D942ZW1S75jGU1+OtJs6SwjZK4aSTO7 4K6A== X-Gm-Message-State: AOAM5312teMBwa+pMInkst7Id3hHReVAb8hFDNuN0BAy9Q8ymurbZKUA 1q48XEdLGR6qUlAguOzOzOgxSCMfM38ylw== X-Google-Smtp-Source: ABdhPJwBrdXxP/7jVyzaiPf1wDrXhraWmfWkuwNhOB4EhC9b76ELKhvQ+LZLoINqPqP6Pew5tT8niw== X-Received: by 2002:a5d:5144:: with SMTP id u4mr30715099wrt.91.1635763502136; Mon, 01 Nov 2021 03:45:02 -0700 (PDT) Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id g2sm13216635wrq.62.2021.11.01.03.45.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Nov 2021 03:45:01 -0700 (PDT) Message-ID: <8624d1b4164dd14846362d66005552705064de96.camel@gmail.com> Subject: Re: [PATCH 2/2] doc: Document =?UTF-8?Q?=E2=80=98home-bash-extension=E2=80=99?= configuration record. From: Liliana Marie Prikler To: Xinglu Chen , 51543@debbugs.gnu.org Date: Mon, 01 Nov 2021 11:45:00 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 51543 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, Am Montag, den 01.11.2021, 10:45 +0100 schrieb Xinglu Chen: > * doc/guix.texi (Shells Home Services): Document ‘home-bash- > extension’ > configuration record. > * gnu/home/services/shells.scm (generate-home-bash-documentation): > Extract > docstrings from ‘home-bash-extension’. > > Fixes: > --- > doc/guix.texi | 24 ++++++++++++++++++++++++ > gnu/home/services/shells.scm | 14 ++++++++++---- > 2 files changed, 34 insertions(+), 4 deletions(-) > > diff --git a/doc/guix.texi b/doc/guix.texi > index f7312a5b30..a3b440f5c9 100644 > --- a/doc/guix.texi > +++ b/doc/guix.texi > @@ -36206,7 +36206,31 @@ > process for example). > > @end table > +@end deftp > + > +To extend the Bash service, one has to use a @code{home-bash- > extension}, > +which contains mostly the same fields as @code{home-bash- > configuration}. This sounds like you're forcing people to extend their services. Write it "You can extend the bash service by using home-bash-extension, whose fields mostly mirror that of home-bash-service". > +@deftp {Data Type} home-bash-extension > +Available @code{home-bash-extension} fields are: > + > +@table @asis > +@item @code{environment-variables} (default: @code{()}) (type: > alist) > +Association list of environment variables to set. > + > +@item @code{aliases} (default: @code{()}) (type: alist) > +Association list of aliases to set. > > +@item @code{bash-profile} (default: @code{()}) (type: text-config) > +List of file-like objects. > + > +@item @code{bashrc} (default: @code{()}) (type: text-config) > +List of file-like objects. > + > +@item @code{bash-logout} (default: @code{()}) (type: text-config) > +List of file-like objects. > + > +@end table > @end deftp This documentation is a little sparse, don't you agree? Are the keys to environment-variables strings or symbols? At which point are these fields inserted into which files (e.g. do the aliases come before profile or after it)? If some field is already described as part of home-bash-service, you might also want to link back to it, but you should still state where the extension occurs. Is new code added to the front or to the back for instance. (On that note, is the text-config type well-documented?) Regards, Liliana From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 01 09:22:12 2021 Received: (at 51543) by debbugs.gnu.org; 1 Nov 2021 13:22:12 +0000 Received: from localhost ([127.0.0.1]:34007 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mhXGO-0008A5-8K for submit@debbugs.gnu.org; Mon, 01 Nov 2021 09:22:12 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:36338 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mhXGM-00089p-V9 for 51543@debbugs.gnu.org; Mon, 01 Nov 2021 09:22:11 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1635772922; bh=uJ2s5d5HgWov099g2YQoT81ljzKMnhd6JPVvF49nxVE=; h=From:To:Subject:In-Reply-To:References:Date; b=F9lWx4V3Ei+ICNLh0BvcZDoL0OdaF+y8bM2T5jmrMvuErYBPnmiWIQsUQfA5Q3gfd +XVh7ICWMI4XuTkHUAgmf55zkZRpTs202G5VX3FRGB/4kLcvra4umntcMLLxBwlswm TtCtAA+i7D+ePu1Rdrsr+5XAe5NYVai9XWNZEdfQ= To: Liliana Marie Prikler , 51543@debbugs.gnu.org Subject: Re: [bug#51543] [PATCH 2/2] doc: Document =?utf-8?Q?=E2=80=98home?= =?utf-8?Q?-bash-extension=E2=80=99?= configuration record. In-Reply-To: <8624d1b4164dd14846362d66005552705064de96.camel@gmail.com> References: <8624d1b4164dd14846362d66005552705064de96.camel@gmail.com> Date: Mon, 01 Nov 2021 14:22:01 +0100 Message-ID: <87k0hs57uu.fsf@disroot.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 2.9 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi, On Mon, Nov 01 2021, Liliana Marie Prikler wrote: > Hi, > > Am Montag, den 01.11.2021, 10:45 +0100 schrieb Xinglu Chen: >> * doc/guix.texi (Shells Home Services): Document ‘home-bash- >> extension’ >> configuration record. >> * gnu/home/services/ [...] Content analysis details: (2.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS 0.0 PDS_RDNS_DYNAMIC_FP RDNS_DYNAMIC with FP steps X-Debbugs-Envelope-To: 51543 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.9 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi, On Mon, Nov 01 2021, Liliana Marie Prikler wrote: > Hi, > > Am Montag, den 01.11.2021, 10:45 +0100 schrieb Xinglu Chen: >> * doc/guix.texi (Shells Home Services): Document ‘home-bash- >> extension’ >> configuration record. >> * gnu/home/services/ [...] Content analysis details: (2.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS 1.0 BULK_RE_SUSP_NTLD Precedence bulk and RE: from a suspicious TLD -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager 0.0 PDS_RDNS_DYNAMIC_FP RDNS_DYNAMIC with FP steps --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, On Mon, Nov 01 2021, Liliana Marie Prikler wrote: > Hi, > > Am Montag, den 01.11.2021, 10:45 +0100 schrieb Xinglu Chen: >> * doc/guix.texi (Shells Home Services): Document =E2=80=98home-bash- >> extension=E2=80=99 >> configuration record. >> * gnu/home/services/shells.scm (generate-home-bash-documentation): >> Extract >> docstrings from =E2=80=98home-bash-extension=E2=80=99. >>=20 >> Fixes: >> --- >> doc/guix.texi | 24 ++++++++++++++++++++++++ >> gnu/home/services/shells.scm | 14 ++++++++++---- >> 2 files changed, 34 insertions(+), 4 deletions(-) >>=20 >> diff --git a/doc/guix.texi b/doc/guix.texi >> index f7312a5b30..a3b440f5c9 100644 >> --- a/doc/guix.texi >> +++ b/doc/guix.texi >> @@ -36206,7 +36206,31 @@ >> process for example). >>=20=20 >> @end table >> +@end deftp >> + >> +To extend the Bash service, one has to use a @code{home-bash- >> extension}, >> +which contains mostly the same fields as @code{home-bash- >> configuration}. > This sounds like you're forcing people to extend their services. Write > it "You can extend the bash service by using home-bash-extension, whose > fields mostly mirror that of home-bash-service". Indeed, that sounds better. >> +@deftp {Data Type} home-bash-extension >> +Available @code{home-bash-extension} fields are: >> + >> +@table @asis >> +@item @code{environment-variables} (default: @code{()}) (type: >> alist) >> +Association list of environment variables to set. >> + >> +@item @code{aliases} (default: @code{()}) (type: alist) >> +Association list of aliases to set. >>=20=20 >> +@item @code{bash-profile} (default: @code{()}) (type: text-config) >> +List of file-like objects. >> + >> +@item @code{bashrc} (default: @code{()}) (type: text-config) >> +List of file-like objects. >> + >> +@item @code{bash-logout} (default: @code{()}) (type: text-config) >> +List of file-like objects. >> + >> +@end table >> @end deftp > This documentation is a little sparse, don't you agree? Are the keys > to environment-variables strings or symbols? The keys should be strings; the rules for =E2=80=98home-environment-variable-service-type=E2=80=99 apply here (see = =E2=80=9C11.3.1 Essential Home Services=E2=80=9D). > At which point are these fields inserted into which files (e.g. do the > aliases come before profile or after it)? Good question! The contents of =E2=80=98aliases=E2=80=99 and =E2=80=98bash= rc=E2=80=99 are put into ~/.bashrc, in that order. The contents of =E2=80=98bash-profile=E2=80=99 a= nd =E2=80=98environment-variables=E2=80=99 are put into ~/.bash_profile, in th= at order. This doesn=E2=80=99t seem that consistent, is there any preference to what = order should be used? > If some field is already described as part of home-bash-service, you > might also want to link back to it, but you should still state where > the extension occurs. Is new code added to the front or to the back > for instance. (On that note, is the text-config type > well-documented?) I don=E2=80=99t think there is a way to link to =E2=80=98home-bash-configur= ation=E2=80=99 using Texinfo; one can only link to =E2=80=9CShells Home Services=E2=80=9D. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmF/6fkVHHB1YmxpY0B5 b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5MZ0P/0FcR1Mhify/gFakPR7+0yyZpIAr hYWr1JyM/qfMXIN7MJjtGM8Fxi7FRYXT/mBjoxvl1shtHeJv1dU3i44g9nl+T+1f ydnbUS3SMcWYYIGI2ZDkNVoE1yfL9ogvm9sX1k5EFyWwNysBkgCyVDuWfHLWhF8v fj2C82r91mdFb5VEw/l1Yj1AhJ3PYEAuJ6Tb6s23UfkLb2oZsbug9+suJR92R72s G3P5hdoM+YdvJk4L84nKOakXRq//uNTy8WOzZ+q/WUm+Zu1+TRHHkkFRz1D1uUnY d+KxzzucsLEcmBMtW3HRddzlsrrt5J6l/Dx9Cfrh9kY4z947ClWObSb4S1T3Eon0 lAnsQOoO4JFygjcyuiGosITo/0HZJuEuGuHSO/gdZiFqrnpdb3CMl6kdbo32tXEj lfFgdvVEgaQ+jHB86rsE3crbuvT0v6cP4+ltbx8FtTp3BgBoLvvIn+P8mQFLxYJ9 Kb8t02hXfwE7wJw7UM9cAse2RtmjlWPefROYONaAU/Koy8ABJsm29GIzDpPNe2JM RlhBMzXPZypA+wjOg1kDqsnboTDPEqYLspdro8hFxBdUD7cOqXajPrgrrh0G0L0y Y+ZN6A4w0lkdTPLJ1nJeMjVp1fc60v/ryaUuClOix35gpJ+aO+YKJP4HI2f6CifM U/p74e+AKf+Kj88Q =fJwV -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 01 12:39:05 2021 Received: (at 51543) by debbugs.gnu.org; 1 Nov 2021 16:39:05 +0000 Received: from localhost ([127.0.0.1]:35964 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mhaKv-0007rc-0p for submit@debbugs.gnu.org; Mon, 01 Nov 2021 12:39:05 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:45937) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mhaKq-0007qw-RK for 51543@debbugs.gnu.org; Mon, 01 Nov 2021 12:39:04 -0400 Received: by mail-wm1-f68.google.com with SMTP id g191-20020a1c9dc8000000b0032fbf912885so326001wme.4 for <51543@debbugs.gnu.org>; Mon, 01 Nov 2021 09:39:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=EI61YK+THfuXmEwX8Ze9xjruFfdsvE/nopjRPgkqyO4=; b=PfFpAVSF5sgEmeRmm78jeDkh79VAKx6ZbIZLMFqg1/JjSpRy7K3IZ2PRLmVHjvzBbG UmkPbO1MGUfdDD3myBOG8eEFZkl86bRXxxn7mK3W0wro0bJ5Pq1RJD8S8TWqH9Smvyez a8eLiJ+Z6i20lwgCTJ+KgklbdRBhGr4MlkxHg6HP+PebUkczxf0lHgyjxB38uqk35E93 gN8D5mX4q+Wyal0SqhOZiuwlKZgNtYY0G9KGh9aqutKvUDrbC42YV0PmqxIPR9h8QqVU 5GRL0Q2Um9F6iT3sY27Vh9PzVzhFlnohK+Zo2nVvCOPoB9jlaAIlKNO4b42VyLw01qkB Hg3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=EI61YK+THfuXmEwX8Ze9xjruFfdsvE/nopjRPgkqyO4=; b=hNIgdGzXT7qNx2+gZwKo0Ho7AA/7PC80RlJh9I8K1IAAFDyclc9KWVDVWim75Oiv4x sc0Ho14N5PlDJHFaQdCufewM6ehyKrco5yoNXeUAzANpfLDlT8XksFfJgPWQfFp6Vaeo EOvrCKSmznrJ+kdhUnAoMEXw5u67W8yTEJmovzOtJucmPVfaUN8UeGUIIH8nQb+EjPoZ NaNntAhf0eHUEh148ldC0MJC1z3EjjeXl4ZlrYyD8nnToO3uD9Ul/BQulC+XYFucUVKu nAgBaADfVKVGjAnipD9piPKIk5rHsEIpk4dh8zoqBA6hYeAjyBrmEzE1VPTVl2n1NFaF ZHIg== X-Gm-Message-State: AOAM532fZ9Bp34mRZ/JlP/tX71HTYJDY9vgLwTgIelr7fa45RAdXotyS Ubmq2VEoq1+x8A25wOLk8CyvUVJnj9zEnA== X-Google-Smtp-Source: ABdhPJyfwTL6bErh3MM4+NaqSCJjYhypI9ycgIg6yyswmOUPVJj2qbief5Edq32y1Bw9wMD6thafFw== X-Received: by 2002:a05:600c:3b17:: with SMTP id m23mr9792wms.80.1635784734747; Mon, 01 Nov 2021 09:38:54 -0700 (PDT) Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id v6sm17230754wrx.17.2021.11.01.09.38.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Nov 2021 09:38:54 -0700 (PDT) Message-ID: Subject: Re: [bug#51543] [PATCH 2/2] doc: Document =?UTF-8?Q?=E2=80=98home-bash-extension=E2=80=99?= configuration record. From: Liliana Marie Prikler To: Xinglu Chen , 51543@debbugs.gnu.org Date: Mon, 01 Nov 2021 17:38:52 +0100 In-Reply-To: <87k0hs57uu.fsf@disroot.org> References: <8624d1b4164dd14846362d66005552705064de96.camel@gmail.com> <87k0hs57uu.fsf@disroot.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 51543 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, Am Montag, den 01.11.2021, 14:22 +0100 schrieb Xinglu Chen: > [...] > > The keys should be strings; the rules for > ‘home-environment-variable-service-type’ apply here (see “11.3.1 > Essential Home Services”). You might want to explicitly state that. > > At which point are these fields inserted into which files (e.g. do > > the aliases come before profile or after it)? > > Good question! The contents of ‘aliases’ and ‘bashrc’ are put into > ~/.bashrc, in that order. The contents of ‘bash-profile’ and > ‘environment-variables’ are put into ~/.bash_profile, in that order. > This doesn’t seem that consistent, is there any preference to what > order should be used? You can use whichever makes sense to you, I'm just pointing out that it ought to be documented. > > If some field is already described as part of home-bash-service, > > you might also want to link back to it, but you should still state > > where the extension occurs. Is new code added to the front or to > > the back for instance. (On that note, is the text-config type > > well-documented?) > > I don’t think there is a way to link to ‘home-bash-configuration’ > using Texinfo; one can only link to “Shells Home Services”. Texinfo should support anchors, which can point to arbitrary text. Of course one could overdo it by linking each and every field, but imho having one link for context is better than none. Thoughts? From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 05 07:57:22 2021 Received: (at 51543) by debbugs.gnu.org; 5 Nov 2021 11:57:22 +0000 Received: from localhost ([127.0.0.1]:45007 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mixqT-0003kN-Vf for submit@debbugs.gnu.org; Fri, 05 Nov 2021 07:57:22 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:41888 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mixqE-0003je-9e for 51543@debbugs.gnu.org; Fri, 05 Nov 2021 07:57:20 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1636113420; bh=C8Iz2Fv28a8nUU/01+0gqyQFDRfUbEAF4MTi9gsqeSQ=; h=From:To:Subject:In-Reply-To:References:Date; b=jykyL/rjigVvGleQL5mA8bNfAWXSMKQMOUH8CKAIra//lZzhYG8wBcHc2MiIg49Sl aPrH8I/Er+ns1xX+MVPV5VwfwbqxrsICms/JziZHg+uHNlVG1SLiQ/TZ5YO0bUvfXt QZ64cYDar5thMfrR+hSXUqZoQEGqxa/r49x/z4MI= To: Liliana Marie Prikler , 51543@debbugs.gnu.org Subject: Re: [bug#51543] [PATCH 2/2] doc: Document =?utf-8?Q?=E2=80=98home?= =?utf-8?Q?-bash-extension=E2=80=99?= configuration record. In-Reply-To: References: <8624d1b4164dd14846362d66005552705064de96.camel@gmail.com> <87k0hs57uu.fsf@disroot.org> Date: Fri, 05 Nov 2021 12:56:59 +0100 Message-ID: <87tugq4xys.fsf@disroot.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 3.3 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi, On Mon, Nov 01 2021, Liliana Marie Prikler wrote: > Hi, > > Am Montag, den 01.11.2021, 14:22 +0100 schrieb Xinglu Chen: >> [...] >> >> The keys should be strings; the rules for >> ‘home-environment-variable-service-type’ apply here (see “11.3.1 [...] Content analysis details: (3.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 T_SPF_TEMPERROR SPF: test of record failed (temperror) 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS 0.0 PDS_RDNS_DYNAMIC_FP RDNS_DYNAMIC with FP steps 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-Debbugs-Envelope-To: 51543 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.9 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi, On Mon, Nov 01 2021, Liliana Marie Prikler wrote: > Hi, > > Am Montag, den 01.11.2021, 14:22 +0100 schrieb Xinglu Chen: >> [...] >> >> The keys should be strings; the rules for >> ‘home-environment-variable-service-type’ apply here (see “11.3.1 [...] Content analysis details: (2.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS 1.0 BULK_RE_SUSP_NTLD Precedence bulk and RE: from a suspicious TLD -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager 0.0 PDS_RDNS_DYNAMIC_FP RDNS_DYNAMIC with FP steps --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, On Mon, Nov 01 2021, Liliana Marie Prikler wrote: > Hi, > > Am Montag, den 01.11.2021, 14:22 +0100 schrieb Xinglu Chen: >> [...] >>=20 >> The keys should be strings; the rules for >> =E2=80=98home-environment-variable-service-type=E2=80=99 apply here (see= =E2=80=9C11.3.1 >> Essential Home Services=E2=80=9D). > You might want to explicitly state that. Yes, good idea. >> > At which point are these fields inserted into which files (e.g. do >> > the aliases come before profile or after it)? >>=20 >> Good question! The contents of =E2=80=98aliases=E2=80=99 and =E2=80=98b= ashrc=E2=80=99 are put into >> ~/.bashrc, in that order. The contents of =E2=80=98bash-profile=E2=80= =99 and >> =E2=80=98environment-variables=E2=80=99 are put into ~/.bash_profile, in= that order. >> This doesn=E2=80=99t seem that consistent, is there any preference to wh= at >> order should be used? > You can use whichever makes sense to you, I'm just pointing out that it > ought to be documented. > >> > If some field is already described as part of home-bash-service, >> > you might also want to link back to it, but you should still state >> > where the extension occurs. Is new code added to the front or to >> > the back for instance. (On that note, is the text-config type >> > well-documented?) >>=20 >> I don=E2=80=99t think there is a way to link to =E2=80=98home-bash-confi= guration=E2=80=99 >> using Texinfo; one can only link to =E2=80=9CShells Home Services=E2=80= =9D. > Texinfo should support anchors, which can point to arbitrary text. Of > course one could overdo it by linking each and every field, but imho > having one link for context is better than none. Ah, that would do it. Thanks for the pointer. I will send an updated series. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmGFHAsVHHB1YmxpY0B5 b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5oFkP/2tuB4bNBzEMZXWTXHX3LRJNWPPD zCbKWDW7EAwhKe/1d6wTkPQaiaz1A0NphncDJCqhHB/PJ0ixgLC7U9SdnB6Y+3bA /0zMUcIJITuN9EzBEKJHQqdJ7oPCE3o+C9W3RF0kDyaPfNJAxMr5+DaW4Vzxeua5 4h2Hx/qYw4QWdHVpTE3f11d+da5qJ7PlhDkzLoEq6Tln+1bFvtq8EGLldvK+Od7d r72pjf5GWgbOJaR3OWizpuA7gOTeMIt6rTjl9+BXDDLChl3ICfOSKrbS4QIGU738 Gx/bYGfsAodTXcoBlYStkxm5hy3kV9vY9Qwldcm2fItaK4mphCqYr0TT8mOz20Qk q+++8n/bDxzJtBOhdz1fMj8Oi7t21WomxLbOshIDuTXnc4ygaKOwR5jpod6aaSGV MAVbtNyVW7z5judCzDFncfFLMC4oTiyuB+R4LOMW5Xb7IUrP37+wwWlymmLaQfds ieKFga2iQK4KD8XE7RQVMEsTZZ+ICVEoogtpiY917M+/Y4gg3IPlOohGMivtrcJ+ 78PcEFUdqXi+5/AklayIJF37jNhJWdq+Dc4+qeqxRK6s+a581T4adpkZreihKmHf zRlqOJho8H/a2wOizfgherOtPAcfv2k8CA3nJBt7UMiZ3c1EX4ZSKxJZF6g5wsFs RyZqUQpbI+B9BVDl =nS8M -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 05 10:03:14 2021 Received: (at 51543) by debbugs.gnu.org; 5 Nov 2021 14:03:14 +0000 Received: from localhost ([127.0.0.1]:46710 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mizoI-0007M7-Gg for submit@debbugs.gnu.org; Fri, 05 Nov 2021 10:03:14 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:33832 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mizoG-0007Lr-Hb for 51543@debbugs.gnu.org; Fri, 05 Nov 2021 10:03:13 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1636120985; bh=wcHC6BdNZcxvQXWcDehbOg+Sn0ruusHzkuzUKX7zFXs=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=WEfm585Dso3XX++1hLas8BQDmtkXCnDnMRbi3vV+Gq9ai6Rjwq06yY3JBlaZWaxpT Gtuah/rbbrCjFEGu4fVC5YaasxYsWlhDzlAXaNO8cIBqqnG+XO2I1MiZjq7fblVCZC RDbS9jWqRS6fyHOVy6PqnMqRAyAq1dRcd08+N6kE= To: 51543@debbugs.gnu.org Subject: [PATCH 0/2] Some improvements to the Bash home service In-Reply-To: References: Message-Id: Date: Fri, 05 Nov 2021 15:03:03 +0100 MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 2.9 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Changes since v1: * Improvements to the documentation of ‘home-bash-configuration’ and ‘home-bash-extension’. * Reorder the serialization of the ‘guix-defaults?’, ‘alias’, and ‘bashrc’ fields. Content analysis details: (2.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS 0.0 PDS_RDNS_DYNAMIC_FP RDNS_DYNAMIC with FP steps X-Debbugs-Envelope-To: 51543 Cc: Liliana Marie Prikler X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.9 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Changes since v1: * Improvements to the documentation of ‘home-bash-configuration’ and ‘home-bash-extension’. * Reorder the serialization of the ‘guix-defaults?’, ‘alias’, and ‘bashrc’ fields. Content analysis details: (1.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager 0.0 PDS_RDNS_DYNAMIC_FP RDNS_DYNAMIC with FP steps --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Changes since v1: * Improvements to the documentation of =E2=80=98home-bash-configuration=E2= =80=99 and =E2=80=98home-bash-extension=E2=80=99. * Reorder the serialization of the =E2=80=98guix-defaults?=E2=80=99, =E2=80= =98alias=E2=80=99, and =E2=80=98bashrc=E2=80=99 fields. Xinglu Chen (2): home: services: bash: Add =E2=80=98aliases=E2=80=99 field. doc: Improve documentation of the Bash home service doc/guix.texi | 54 +++++++++++++++++- gnu/home/services/shells.scm | 108 +++++++++++++++++++++++++---------- guix/scripts/home/import.scm | 24 ++++++++ 3 files changed, 153 insertions(+), 33 deletions(-) base-commit: 0e19713c1fbfd3a01347e0d490434a53a596ed3c =2D-=20 2.33.0 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmGFOZcVHHB1YmxpY0B5 b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5EL8P/jcrT+hp+GgipY7ybOBsEX19v2gM TEbuAEXaUP0fnBvE4EcAVYpwb5X6mN1ZMo0F3Cks+I9aMzloXJyxFr+vB6dsSiac QyLotm//rf/7UXv4etPwNUQiz3S6x8ovYc++TbnRKfPeIifHI8p/O2nPTEo74Znn j6q4Wue9B6Dclog2SZLOrMGEO+N/xXPEZISlzX+ad24yWFSU3Gft1eECmfFTB1VE qZke1SnZHbRwjSfT+9HwC62mC+wIBv3geuj145Ta/shcHmSXJUh6kcY71m38e9rv q3rA7YpwUvDhDQkixQ1zLB4aZpMlWBTEU7C2lrh49bKrzjUTagJzSTic+sKVZFil s0qHeI6JFgJEp13v5lv+JGJ5vCH1cy5YvEOQFUrRJ6eMl3QOdOkPippZJXbP7vG5 yP/KTlCS3FtG1nAxMr5UK+UFimTeyKMlvyXikv9uWbqQxvT8ZS8Kn8MpPd7KXkcr HbyyhkIaglaJeY45R775ewVET87Th1X7p01P6oVgdaFIrqci4rTj8Vp6sQUT585h Sr1UCjGjrhmVHBlouWWDZjxJP0g42q3NM6imqRsWD3ps+QuHNieI/La+9NOfEhVp cRvFqelO6o4xjMiFw8le+N3TzATTlhQgpjcii58iZV68We0T71RkPrjX0BuPgg4F yZXwpcrpdnpY4LNo =Az7c -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 05 10:03:27 2021 Received: (at 51543) by debbugs.gnu.org; 5 Nov 2021 14:03:27 +0000 Received: from localhost ([127.0.0.1]:46713 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mizoU-0007MW-Nh for submit@debbugs.gnu.org; Fri, 05 Nov 2021 10:03:27 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:33854 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mizoL-0007Lz-46 for 51543@debbugs.gnu.org; Fri, 05 Nov 2021 10:03:25 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1636120991; bh=iBLwIFgOsXIxcoZJgOGwguU56vQ4c0+RqPlbomA23A4=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=iriNTP4d1MjMazcg+RPCGe2AJsJhuVUnxS6OsZyxZi9x+4tzDFGPuxbKstNXUPqB3 7dH9w4bx24Y9RdOw8wdUmBxptpqt1Att0NQb2gqHLAc+63NLHU6BjkcfdrxOOGRjX9 bKNbPHbTWyYMlDMjuY6+rSo7hpJU5+BIeVFHv9P8= To: 51543@debbugs.gnu.org Subject: [PATCH 1/2] =?UTF-8?q?home:=20services:=20bash:=20Add=20=E2=80=98?= =?UTF-8?q?aliases=E2=80=99=20field.?= In-Reply-To: References: Message-Id: Date: Fri, 05 Nov 2021 15:03:11 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 3.3 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: * doc/guix.texi (Shells Home Services): Document it. * gnu/home/services/shells.scm (bash-serialize-aliases): New procedure. (home-bash-configuration, home-bash-extension): Add ‘aliases’ field. (h [...] Content analysis details: (3.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 T_SPF_TEMPERROR SPF: test of record failed (temperror) 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS 0.0 PDS_RDNS_DYNAMIC_FP RDNS_DYNAMIC with FP steps 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-Debbugs-Envelope-To: 51543 Cc: Liliana Marie Prikler X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.9 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: * doc/guix.texi (Shells Home Services): Document it. * gnu/home/services/shells.scm (bash-serialize-aliases): New procedure. (home-bash-configuration, home-bash-extension): Add ‘aliases’ field. (h [...] Content analysis details: (1.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager 0.0 PDS_RDNS_DYNAMIC_FP RDNS_DYNAMIC with FP steps * doc/guix.texi (Shells Home Services): Document it. * gnu/home/services/shells.scm (bash-serialize-aliases): New procedure. (home-bash-configuration, home-bash-extension): Add =E2=80=98aliases=E2=80= =99 field. (home-bash-extensions): Adjust accordingly. * guix/scripts/home/import.scm (generate-bash-configuration+modules): Popul= ate the =E2=80=98alias=E2=80=99 field. --- doc/guix.texi | 14 ++++++ gnu/home/services/shells.scm | 83 ++++++++++++++++++++++++++---------- guix/scripts/home/import.scm | 24 +++++++++++ 3 files changed, 98 insertions(+), 23 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index ea1973f02c..f7312a5b30 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -36173,6 +36173,20 @@ @item @code{environment-variables} (default: @code{()}) (type: alist) Association list of environment variables to set for the Bash session. =20 +@item @code{aliases} (default: @code{()}) (type: alist) +Association list of aliases to set for the Bash session. The alias will +automatically be quoted, so something line this: + +@lisp +'((\"ls\" . \"ls -alF\")) +@end lisp + +turns into + +@example +alias ls=3D\"ls -alF\" +@end example + @item @code{bash-profile} (default: @code{()}) (type: text-config) List of file-like objects, which will be added to @file{.bash_profile}. Used for executing user's commands at start of login shell (In most diff --git a/gnu/home/services/shells.scm b/gnu/home/services/shells.scm index e2730967b2..f24e47f762 100644 --- a/gnu/home/services/shells.scm +++ b/gnu/home/services/shells.scm @@ -305,6 +305,18 @@ (define home-zsh-service-type ;;; Bash. ;;; =20 +(define (bash-serialize-aliases field-name val) + #~(string-append + #$@(map + (match-lambda + ((key . #f) + "") + ((key . #t) + #~(string-append "alias " #$key "\n")) + ((key . value) + #~(string-append "alias " #$key "=3D\"" #$value "\"\n"))) + val))) + (define-configuration home-bash-configuration (package (package bash) @@ -317,6 +329,21 @@ (define-configuration home-bash-configuration (alist '()) "Association list of environment variables to set for the Bash session." serialize-posix-env-vars) + (aliases + (alist '()) + "Association list of aliases to set for the Bash session. The alias wi= ll +automatically be quoted, so something line this: + +@lisp +'((\"ls\" . \"ls -alF\")) +@end lisp + +turns into + +@example +alias ls=3D\"ls -alF\" +@end example" + bash-serialize-aliases) (bash-profile (text-config '()) "List of file-like objects, which will be added to @file{.bash_profile}. @@ -387,10 +414,10 @@ (define* (file-if-not-empty field #:optional (extra-c= ontent #f)) (if (or extra-content (not (null? ((configuration-field-getter field-obj) config))= )) `(,(object->snake-case-string file-name) - ,(mixed-text-file + ,(apply mixed-text-file (object->snake-case-string file-name) - (if extra-content extra-content "") - (serialize-field field))) + (cons (serialize-field field) + (if extra-content extra-content '())))) '()))) =20 (filter @@ -413,8 +440,8 @@ (define* (file-if-not-empty field #:optional (extra-con= tent #f)) ,@(list (file-if-not-empty 'bashrc (if (home-bash-configuration-guix-defaults? config) - guix-bashrc - #f)) + (list (serialize-field 'aliases) guix-bashrc) + (list (serialize-field 'alises)))) (file-if-not-empty 'bash-logout))))) =20 (define (add-bash-packages config) @@ -424,6 +451,9 @@ (define-configuration/no-serialization home-bash-extens= ion (environment-variables (alist '()) "Association list of environment variables to set.") + (aliases + (alist '()) + "Association list of aliases to set.") (bash-profile (text-config '()) "List of file-like objects.") @@ -435,24 +465,31 @@ (define-configuration/no-serialization home-bash-exte= nsion "List of file-like objects.")) =20 (define (home-bash-extensions original-config extension-configs) - (home-bash-configuration - (inherit original-config) - (environment-variables - (append (home-bash-configuration-environment-variables original-config) - (append-map - home-bash-extension-environment-variables extension-configs))) - (bash-profile - (append (home-bash-configuration-bash-profile original-config) - (append-map - home-bash-extension-bash-profile extension-configs))) - (bashrc - (append (home-bash-configuration-bashrc original-config) - (append-map - home-bash-extension-bashrc extension-configs))) - (bash-logout - (append (home-bash-configuration-bash-logout original-config) - (append-map - home-bash-extension-bash-logout extension-configs))))) + (match original-config + (($ _ _ _ environment-variables aliases + bash-profile bashrc bash-logout) + (home-bash-configuration + (inherit original-config) + (environment-variables + (append environment-variables + (append-map + home-bash-extension-environment-variables extension-config= s))) + (aliases + (append aliases + (append-map + home-bash-extension-aliases extension-configs))) + (bash-profile + (append bash-profile + (append-map + home-bash-extension-bash-profile extension-configs))) + (bashrc + (append bashrc + (append-map + home-bash-extension-bashrc extension-configs))) + (bash-logout + (append bash-logout + (append-map + home-bash-extension-bash-logout extension-configs))))))) =20 (define home-bash-service-type (service-type (name 'home-bash) diff --git a/guix/scripts/home/import.scm b/guix/scripts/home/import.scm index 7a7712dd96..fbf89069a7 100644 --- a/guix/scripts/home/import.scm +++ b/guix/scripts/home/import.scm @@ -27,6 +27,9 @@ (define-module (guix scripts home import) #:use-module (gnu packages) #:use-module (ice-9 match) #:use-module (ice-9 pretty-print) + #:use-module (ice-9 rdelim) + #:use-module (ice-9 regex) + #:use-module (ice-9 popen) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) #:export (import-manifest @@ -56,11 +59,32 @@ (define (generate-bash-configuration+modules destinatio= n-directory) (define (destination-append path) (string-append destination-directory "/" path)) =20 + (define (bash-alias->pair line) + (if (string-prefix? "alias" line) + (let ((matched (string-match "alias (.+)=3D\"?'?([^\"']+)\"?'?" li= ne))) + `(,(match:substring matched 1) . ,(match:substring matched 2))) + '())) +=20=20 + (define (parse-aliases input) + (let loop ((line (read-line input)) + (result '())) + (if (eof-object? line) + (reverse result) + (loop (read-line input) + (cons (bash-alias->pair line) result))))) + (let ((rc (destination-append ".bashrc")) (profile (destination-append ".bash_profile")) (logout (destination-append ".bash_logout"))) `((service home-bash-service-type (home-bash-configuration + ,@(if (file-exists? rc) + `((aliases + ',(let* ((port (open-pipe* OPEN_READ "bash" "-i" = "-c" "alias")) + (alist (parse-aliases port))) + (close-port port) + (filter (negate null?) alist)))) + '()) ,@(if (file-exists? rc) `((bashrc (list (local-file ,rc --=20 2.33.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 05 10:03:39 2021 Received: (at 51543) by debbugs.gnu.org; 5 Nov 2021 14:03:39 +0000 Received: from localhost ([127.0.0.1]:46716 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mizoh-0007Mx-Bj for submit@debbugs.gnu.org; Fri, 05 Nov 2021 10:03:39 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:33924 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mizog-0007Mj-BY for 51543@debbugs.gnu.org; Fri, 05 Nov 2021 10:03:38 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1636121012; bh=gkfAFg7N1avHfumXzUmptlBSP1zEaobAGMkOLMgwhIU=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=K1ppp8gKD8klGE6sEAvV81aNM1k9uLmxlEVpDDWfw6AE8qIBj1T2CVueK6Pxyb2zj o4Cigyzj1vmlwYtauFCyoVIO5wkvsqq3XFyvI5FRhera0Dw6AbyKJYP1ER1O4AQifN Pvkk+WWfCuw09nOAGa0SjAh23BxU1GUNU3UYrWas= To: 51543@debbugs.gnu.org Subject: [PATCH 2/2] doc: Improve documentation of the Bash home service In-Reply-To: References: Message-Id: Date: Fri, 05 Nov 2021 15:03:18 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 2.9 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: * doc/guix.texi (Shells Home Services): Document ‘home-bash-extension’ configuration record. * gnu/home/services/shells.scm (generate-home-bash-documentation): Extract docstrings from ‘home-bash [...] Content analysis details: (2.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS 0.0 PDS_RDNS_DYNAMIC_FP RDNS_DYNAMIC with FP steps X-Debbugs-Envelope-To: 51543 Cc: Liliana Marie Prikler X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.9 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: * doc/guix.texi (Shells Home Services): Document ‘home-bash-extension’ configuration record. * gnu/home/services/shells.scm (generate-home-bash-documentation): Extract docstrings from ‘home-bash [...] Content analysis details: (1.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager 0.0 PDS_RDNS_DYNAMIC_FP RDNS_DYNAMIC with FP steps * doc/guix.texi (Shells Home Services): Document =E2=80=98home-bash-extensi= on=E2=80=99 configuration record. * gnu/home/services/shells.scm (generate-home-bash-documentation): Extract docstrings from =E2=80=98home-bash-extension=E2=80=99. (home-bash-configuration): Expound on docstrings. Fixes: --- doc/guix.texi | 44 ++++++++++++++++++++++++++++++++---- gnu/home/services/shells.scm | 29 ++++++++++++++++-------- 2 files changed, 59 insertions(+), 14 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index f7312a5b30..002193e994 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -36159,6 +36159,7 @@ =20 @subsubheading Bash Home Service =20 +@anchor{home-bash-configuration} @deftp {Data Type} home-bash-configuration Available @code{home-bash-configuration} fields are: =20 @@ -36167,15 +36168,20 @@ The Bash package to use. =20 @item @code{guix-defaults?} (default: @code{#t}) (type: boolean) -Add sane defaults like reading @file{/etc/bashrc}, coloring output for -@code{ls} provided by guix to @file{.bashrc}. +Add sane defaults like reading @file{/etc/bashrc} and coloring the output = of +@command{ls} to the end of the @file{.bashrc} file. =20 @item @code{environment-variables} (default: @code{()}) (type: alist) -Association list of environment variables to set for the Bash session. +Association list of environment variables to set for the Bash session. The +rules for the @code{home-environment-variables-service-type} apply +here (@pxref{Essential Home Services}). The contents of this field will be +added after the contents of the @code{bash-profile} field. =20 @item @code{aliases} (default: @code{()}) (type: alist) -Association list of aliases to set for the Bash session. The alias will -automatically be quoted, so something line this: +Association list of aliases to set for the Bash session. The aliases +will be defined after the contents of the @code{bashrc} field has been +put in the @file{.bashrc} file. The alias will automatically be quoted, +so something line this: =20 @lisp '((\"ls\" . \"ls -alF\")) @@ -36206,7 +36212,35 @@ process for example). =20 @end table +@end deftp + +You can extend the Bash service by using the @code{home-bash-extension} +configuration record, whose fields most mirror that of +@code{home-bash-configuration} (@pxref{home-bash-configuration}). The +contents of the extensions will be added to the end of the corresponding +Bash configuration files (@pxref{Bash Startup Files,,, bash, The GNU +Bash Reference Manual}. + +@deftp {Data Type} home-bash-extension +Available @code{home-bash-extension} fields are: + +@table @asis +@item @code{environment-variables} (default: @code{()}) (type: alist) +Association list of environment variables to set. + +@item @code{aliases} (default: @code{()}) (type: alist) +Association list of aliases to set. =20 +@item @code{bash-profile} (default: @code{()}) (type: text-config) +List of file-like objects. + +@item @code{bashrc} (default: @code{()}) (type: text-config) +List of file-like objects. + +@item @code{bash-logout} (default: @code{()}) (type: text-config) +List of file-like objects. + +@end table @end deftp =20 @subsubheading Zsh Home Service diff --git a/gnu/home/services/shells.scm b/gnu/home/services/shells.scm index f24e47f762..9b8427da7b 100644 --- a/gnu/home/services/shells.scm +++ b/gnu/home/services/shells.scm @@ -323,16 +323,21 @@ (define-configuration home-bash-configuration "The Bash package to use.") (guix-defaults? (boolean #t) - "Add sane defaults like reading @file{/etc/bashrc}, coloring output -for @code{ls} provided by guix to @file{.bashrc}.") + "Add sane defaults like reading @file{/etc/bashrc} and coloring the out= put of +@command{ls} to the end of the @file{.bashrc} file.") (environment-variables (alist '()) - "Association list of environment variables to set for the Bash session." + "Association list of environment variables to set for the Bash session.= The +rules for the @code{home-environment-variables-service-type} apply +here (@pxref{Essential Home Services}). The contents of this field will be +added after the contents of the @code{bash-profile} field." serialize-posix-env-vars) (aliases (alist '()) - "Association list of aliases to set for the Bash session. The alias wi= ll -automatically be quoted, so something line this: + "Association list of aliases to set for the Bash session. The aliases = will be +defined after the contents of the @code{bashrc} field has been put in the +@file{.bashrc} file. The alias will automatically be quoted, so something= line +this: =20 @lisp '((\"ls\" . \"ls -alF\")) @@ -646,10 +651,16 @@ (define (generate-home-shell-profile-documentation) 'home-shell-profile-configuration)) =20 (define (generate-home-bash-documentation) - (generate-documentation - `((home-bash-configuration - ,home-bash-configuration-fields)) - 'home-bash-configuration)) + (string-append + (generate-documentation + `((home-bash-configuration + ,home-bash-configuration-fields)) + 'home-bash-configuration) + "\n\n" + (generate-documentation + `((home-bash-extension + ,home-bash-extension-fields)) + 'home-bash-extension))) =20 (define (generate-home-zsh-documentation) (generate-documentation --=20 2.33.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 05 15:36:31 2021 Received: (at 51543) by debbugs.gnu.org; 5 Nov 2021 19:36:31 +0000 Received: from localhost ([127.0.0.1]:47303 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mj50o-0007hh-U6 for submit@debbugs.gnu.org; Fri, 05 Nov 2021 15:36:31 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:51192) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mj50n-0007hV-Bz for 51543@debbugs.gnu.org; Fri, 05 Nov 2021 15:36:29 -0400 Received: by mail-wm1-f65.google.com with SMTP id 133so7966266wme.0 for <51543@debbugs.gnu.org>; Fri, 05 Nov 2021 12:36:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=61BcWpLDSxtSa/HsPPeC5Znml88jSmaj95NCdhxI5YQ=; b=T4aMqFCi1CSiKYaRBRwpCCNJAK0d+y+2gyKbbYAXxlirsHaVBa6FtgG0F0bLmF6pwd ZxevGvXiT0WHxZXJlZG70eufT9TERMa4k0PO1Q1wIQtd+85UvrRfUzLRgEcbO/aNyJZq +aomVjoQfhgTVaRR9NBpw+lQRMz8coG20AngzotkwrhCCE9XZ4Yblwqb97nEsRl/Jr5W tk0TiqHmfXnP+lAXscUFkDGvj6DCRRFf0erwkPTaDkXoZIUogB1kdPgJzma6+4qH1bMZ uXunnsl6P20s0Ul+e13UccGKRYnhmMJFe9zhTD646JNGWYTfFeCjnCF2XfVv+jFlfam7 tOIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=61BcWpLDSxtSa/HsPPeC5Znml88jSmaj95NCdhxI5YQ=; b=6yU5BQb0b2jw46LoHo19gqFeaTtcaxGRDbHzLQlHriF9bi3+y6Zdum542AYYDHSPM2 2wDLG0dTkWVHkmbtuESslDWvOqaaggXTog8edjfD4fDjbUtJm7oxHMg1s0hxe7xT/qK7 OJl+OU0pCJ1rMPsdqpTC22c5wRaU3Bi37wMcdh2eVB/87PpLe2KWLm84TWwSwEsoHUbJ BXkjhWwPO8c5tbFBoRQTOWPsqjDG642+yg5V1lH3nRBQh90esoWPkWpRvXvr0ixmhxF7 IXCZ+3JsFhLNhJnQ/0b6oInW7zbJpWMOmO+sTjCfh8m9L2vYIJqdteAaQ/pmDEWTFjI6 srbA== X-Gm-Message-State: AOAM530BPZnMVNVjOPdIba69u0hxdDRmwz5YhW0bWCerrslOH2HGj+Wx I6mjx49MH6+wqf5JnQc/EWnBKmY2jaZRvQ== X-Google-Smtp-Source: ABdhPJy01eereQdL/Calbk7o+0zG8KnJX23xC0bvi2cVeNYTSXghsC1qlxFXo9Mh3fGa8RQoFUNqbg== X-Received: by 2002:a7b:c4c2:: with SMTP id g2mr32407164wmk.195.1636140983040; Fri, 05 Nov 2021 12:36:23 -0700 (PDT) Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id z135sm14626119wmc.45.2021.11.05.12.36.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Nov 2021 12:36:22 -0700 (PDT) Message-ID: <572780a1911e6972d9d956fd648a53c0d773b75b.camel@gmail.com> Subject: Re: [PATCH 2/2] doc: Improve documentation of the Bash home service From: Liliana Marie Prikler To: Xinglu Chen , 51543@debbugs.gnu.org Date: Fri, 05 Nov 2021 20:36:21 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 51543 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, Am Freitag, den 05.11.2021, 15:03 +0100 schrieb Xinglu Chen: > @item @code{guix-defaults?} (default: @code{#t}) (type: boolean) > -Add sane defaults like reading @file{/etc/bashrc}, coloring output > for > -@code{ls} provided by guix to @file{.bashrc}. > +Add sane defaults like reading @file{/etc/bashrc} and coloring the > output of > +@command{ls} to the end of the @file{.bashrc} file. Regarding this option, you might want to instead provide a sane- defaults-bash-service or something along those lines instead of using an extra field. However, as this field already existed before, this is not a blocker for this series. > [...] > @end table > +@end deftp > + > +You can extend the Bash service by using the @code{home-bash- > extension} > +configuration record, whose fields most mirror that of > +@code{home-bash-configuration} (@pxref{home-bash- > configuration}). The > +contents of the extensions will be added to the end of the > corresponding > +Bash configuration files (@pxref{Bash Startup Files,,, bash, The GNU > +Bash Reference Manual}. > + > +@deftp {Data Type} home-bash-extension > +Available @code{home-bash-extension} fields are: > + > +@table @asis > +@item @code{environment-variables} (default: @code{()}) (type: > alist) > +Association list of environment variables to set. > + > +@item @code{aliases} (default: @code{()}) (type: alist) > +Association list of aliases to set. > > +@item @code{bash-profile} (default: @code{()}) (type: text-config) > +List of file-like objects. > + > +@item @code{bashrc} (default: @code{()}) (type: text-config) > +List of file-like objects. > + > +@item @code{bash-logout} (default: @code{()}) (type: text-config) > +List of file-like objects. > + > +@end table > @end deftp Is there a reason why this documentation stayed more or less the same? I see the fields have an updated documentation, but it appears not to be reflected here. Or are strings taken from the [1/2] patch? Either way, since the data types ought to be already known, you should write something along the lines of "Additional environment variables to set. These will be concatenated with the environment variables from other extensions and the base service to form one coherent block of environment variables." and so on, focusing on what it does rather than what it is. Cheers From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 07 06:20:28 2021 Received: (at 51543) by debbugs.gnu.org; 7 Nov 2021 11:20:28 +0000 Received: from localhost ([127.0.0.1]:51913 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjgDs-0003wb-Ep for submit@debbugs.gnu.org; Sun, 07 Nov 2021 06:20:28 -0500 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:47204 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjgDq-0003wM-8V for 51543@debbugs.gnu.org; Sun, 07 Nov 2021 06:20:26 -0500 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1636284020; bh=askuRU4Q6lUbnDGUufXjwP0Xi7CWPBO7NOlArFr4RwY=; h=From:To:Subject:In-Reply-To:References:Date; b=IUZAquwPxQkgviP6Mak3iJQJ4wpaDwTh8/beMF1XiZor1+B57qLcaV/rg1KnBH9C7 ucfSq8bvchhSgNip0gQgtoYvyPxnLIyQa4ph5L8v+WD5Xhp+xOfngBlYLkV3h/9B7Y 5i/UIxYoI9fn0tt9RyIKM1X6CounKZNgDaoF2/jw= To: Liliana Marie Prikler , 51543@debbugs.gnu.org Subject: Re: [PATCH 2/2] doc: Improve documentation of the Bash home service In-Reply-To: <572780a1911e6972d9d956fd648a53c0d773b75b.camel@gmail.com> References: <572780a1911e6972d9d956fd648a53c0d773b75b.camel@gmail.com> Date: Sun, 07 Nov 2021 12:20:19 +0100 Message-ID: <87tugo2owc.fsf@disroot.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 2.9 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi, On Fri, Nov 05 2021, Liliana Marie Prikler wrote: > Hi, > > Am Freitag, den 05.11.2021, 15:03 +0100 schrieb Xinglu Chen: >> @item @code{guix-defaults?} (default: @code{#t}) (type: boolean) >> -Add sane defaults like reading @file{/etc/bashrc}, colori [...] Content analysis details: (2.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS 0.0 PDS_RDNS_DYNAMIC_FP RDNS_DYNAMIC with FP steps X-Debbugs-Envelope-To: 51543 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.9 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi, On Fri, Nov 05 2021, Liliana Marie Prikler wrote: > Hi, > > Am Freitag, den 05.11.2021, 15:03 +0100 schrieb Xinglu Chen: >> @item @code{guix-defaults?} (default: @code{#t}) (type: boolean) >> -Add sane defaults like reading @file{/etc/bashrc}, colori [...] Content analysis details: (2.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS 1.0 BULK_RE_SUSP_NTLD Precedence bulk and RE: from a suspicious TLD -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager 0.0 PDS_RDNS_DYNAMIC_FP RDNS_DYNAMIC with FP steps --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, On Fri, Nov 05 2021, Liliana Marie Prikler wrote: > Hi, > > Am Freitag, den 05.11.2021, 15:03 +0100 schrieb Xinglu Chen: >> @item @code{guix-defaults?} (default: @code{#t}) (type: boolean) >> -Add sane defaults like reading @file{/etc/bashrc}, coloring output >> for >> -@code{ls} provided by guix to @file{.bashrc}. >> +Add sane defaults like reading @file{/etc/bashrc} and coloring the >> output of >> +@command{ls} to the end of the @file{.bashrc} file. > Regarding this option, you might want to instead provide a sane- > defaults-bash-service or something along those lines instead of using > an extra field. However, as this field already existed before, this is > not a blocker for this series. That sounds like a good idea! >> [...] >> @end table >> +@end deftp >> + >> +You can extend the Bash service by using the @code{home-bash- >> extension} >> +configuration record, whose fields most mirror that of >> +@code{home-bash-configuration} (@pxref{home-bash- >> configuration}). The >> +contents of the extensions will be added to the end of the >> corresponding >> +Bash configuration files (@pxref{Bash Startup Files,,, bash, The GNU >> +Bash Reference Manual}. >> + >> +@deftp {Data Type} home-bash-extension >> +Available @code{home-bash-extension} fields are: >> + >> +@table @asis >> +@item @code{environment-variables} (default: @code{()}) (type: >> alist) >> +Association list of environment variables to set. >> + >> +@item @code{aliases} (default: @code{()}) (type: alist) >> +Association list of aliases to set. >>=20=20 >> +@item @code{bash-profile} (default: @code{()}) (type: text-config) >> +List of file-like objects. >> + >> +@item @code{bashrc} (default: @code{()}) (type: text-config) >> +List of file-like objects. >> + >> +@item @code{bash-logout} (default: @code{()}) (type: text-config) >> +List of file-like objects. >> + >> +@end table >> @end deftp > Is there a reason why this documentation stayed more or less the same?=20 > I see the fields have an updated documentation, but it appears not to > be reflected here. Or are strings taken from the [1/2] patch? I didn=E2=80=99t change the docstrings for =E2=80=98home-bash-extension=E2= =80=99, only for =E2=80=98home-bash-configuration=E2=80=99. > Either way, since the data types ought to be already known, you should > write something along the lines of "Additional environment variables to > set. These will be concatenated with the environment variables from > other extensions and the base service to form one coherent block of > environment variables." and so on, focusing on what it does rather than > what it is. Yeah, that sounds a lot more informative than the current docstring. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmGHtnMVHHB1YmxpY0B5 b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5U7gP/0DVO3jNB58l9gqzhMdKWhubw6ub ojFVEKOfNMoE9+mPTaNopfUqS+a0Inau0EpfCGaG5EnsyHTZn6XFKW6foP4O5S2N z+w3uTwNvGwxP/aHDhIIjez3BtKMihrpuB/lgPdHbb9CfX4NC1Xlh8YZkOhYuswZ lB/4bLXdHT6az8fXn+WSmECdIAj3q9H6NXqbcelgXWSNvAWnl7L4i2w+iv2v6iUv YXtLoDEFUT1Xz7cvwHsyvnYDVned4/v16OHdO4hp2DMJOE2sh8gqw4Tm1KL/mwAm yCoWF4ilCIa8vIkhv0EZKuQdCMhDJSLtFNcVOIcfkZMBEdb9aLEGt+7X/gNBn3j4 ncfg4m7kSkLRhenbeicpYs/AJqc93vip1NIH5Pb6ODZFoxcyTycUWF2mg3qB0g58 3rkjc3wq2wTdqk5Ng0SIdSEQ5XLf7NLK6QeB4uFFE/5X8Dkt31DqUZYCsaldBK7g fSgK469G9iLtoTPJJ3tMoEDROQ/edshJicJUGcNQXYBtAkVZ/Sg3bITAnNWQTU+A N+yYLzM8vzmym9Zn67XtKvhj/Iam0wWkd//zDfl76UTCWww3JNENAg6tQoWdJDE1 1DDtywo6OpYXz4V+WJO4AOJBCB4d4Th0znQPKeLB8oy9wgCiYmwFutUba0rEFEVU MzlxUGEg5eYnv2UZ =2XaU -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 07 06:36:23 2021 Received: (at 51543) by debbugs.gnu.org; 7 Nov 2021 11:36:23 +0000 Received: from localhost ([127.0.0.1]:51938 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjgTG-0004Vb-QZ for submit@debbugs.gnu.org; Sun, 07 Nov 2021 06:36:22 -0500 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:49720 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjgTF-0004VM-1p for 51543@debbugs.gnu.org; Sun, 07 Nov 2021 06:36:21 -0500 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1636284973; bh=pO3KetwdsRtDrqFOw7/KIJ8PvhY0D5Hs9kwRJKqGMU4=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=g8vuLLSm5ExzyiPuLEE8uXFAZLzRx9GyS6yGp6rRtrLQTNcQHS9T/IeMruj+0Tfsq Sjf/5zTIATRdmZ1cH19FHv1wp4n+or2ToZwo2uyCFvWI3YnWIz/9u5FZyoFhAuSkHC df9mm8Fv00RxbIoHC3pIIbja0qweIHvAoV9mOS9g= To: 51543@debbugs.gnu.org Subject: [PATCH v3 0/2] Some improvements to the Bash home service In-Reply-To: References: Message-Id: Date: Sun, 07 Nov 2021 12:36:12 +0100 MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 2.9 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Changes since v2: * Improve docstrings of ‘home-bash-extension’ fields by describing what they do instead of what they ought to be. Xinglu Chen (2): home: services: bash: Add ‘aliases’ field. doc: Improve documentation of the Bash home service Content analysis details: (2.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS 0.0 PDS_RDNS_DYNAMIC_FP RDNS_DYNAMIC with FP steps X-Debbugs-Envelope-To: 51543 Cc: Liliana Marie Prikler X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.9 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Changes since v2: * Improve docstrings of ‘home-bash-extension’ fields by describing what they do instead of what they ought to be. Xinglu Chen (2): home: services: bash: Add ‘aliases’ field. doc: Improve documentation of the Bash home service Content analysis details: (1.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager 0.0 PDS_RDNS_DYNAMIC_FP RDNS_DYNAMIC with FP steps --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Changes since v2: * Improve docstrings of =E2=80=98home-bash-extension=E2=80=99 fields by des= cribing what they do instead of what they ought to be. Xinglu Chen (2): home: services: bash: Add =E2=80=98aliases=E2=80=99 field. doc: Improve documentation of the Bash home service doc/guix.texi | 60 ++++++++++++++++- gnu/home/services/shells.scm | 122 +++++++++++++++++++++++++---------- guix/scripts/home/import.scm | 24 +++++++ 3 files changed, 169 insertions(+), 37 deletions(-) base-commit: 1ffc0a6be3c1613b2d99ceea098174d1f11f6f3f =2D-=20 2.33.0 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmGHuiwVHHB1YmxpY0B5 b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5FuIP/RbGS7VAAFYx2JAnj8XsR6D6W7Eq cyMXdZDXy/vTAsuuaCU3xQqtn+WdBsmu1h+oK7yRnNql+bRPJvZMOYvE3k5i4Kd6 qeho8SdHV8Soqmb2TXL+OGxDUOLjqEBSNxknH90bU3bvvOdg01UpbVTAIihKGdjH RWBhUlTewxRRn/ioTXfSNdxtYUnJR1x/LMIr8/NhsEoRP71DzUeXWZdiE+QY2dIm 39Yod7LfsWLp+zMlOqixk7kBYlYjo5TlXzlVJU0bFwXWiXsyCGb+I7m1w3GFhLNa X4xA9bwYzUZ175bUDw5GY+I1XdE0fk2J0x+WHHfsiPcG81OHWBSJ0owY5Vcp1SKk x6kGd4UxxSkuJ71YijPOsugzYU2mbJgc3hJLSuT05jakka5NB5V0Po7q3BdK1iVE gLYevPVlq037U+54OJcyFJ3zlkzCGMWKYixZta7xA+PqU8YbtfyunlamqGGJoarT Lp9qfteE9CrbJrNBzm1E7JquPGPBzSBAonQOYZTljTMkW97xVg4BLHOyAtcbvY+3 7sD8iGx1UXVmQCIsXK+VMpDUQvrUBKiJDsxp9J7IdoTbTxesJ58fN4/Gnr05ofls mTI0/+1ViiiWQaJ24YsQUoQia1yI1CLcuwlJ6jR71dnK43Oeg0cge5PX8Cxcgnmd o+u7u+wzP+V/9TYZ =mLbt -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 07 06:36:27 2021 Received: (at 51543) by debbugs.gnu.org; 7 Nov 2021 11:36:27 +0000 Received: from localhost ([127.0.0.1]:51941 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjgTL-0004Vr-0X for submit@debbugs.gnu.org; Sun, 07 Nov 2021 06:36:27 -0500 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:49744 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjgTJ-0004VT-JR for 51543@debbugs.gnu.org; Sun, 07 Nov 2021 06:36:26 -0500 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1636284980; bh=iBLwIFgOsXIxcoZJgOGwguU56vQ4c0+RqPlbomA23A4=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=DoM74FXYTAi/eovNVYdFAGKwXFZcZgvgRaPVIni80Nbnty3EkvsgmFbcUXbykimiD 7eYoz5+eYuYXLXhhc/tE4Bkl4eLZu9yBVnpoo/N/QZ0foPBg7hdm9PV2PfNofvwRZw V0oo4nLlUkUx4Pl0nti33ZvcLFQjD57eIgybgqVs= To: 51543@debbugs.gnu.org Subject: [PATCH v3 1/2] =?UTF-8?q?home:=20services:=20bash:=20Add=20?= =?UTF-8?q?=E2=80=98aliases=E2=80=99=20field.?= In-Reply-To: References: Message-Id: <3a13e86e446d35aa456da06750ad658ba49fd48b.1636284793.git.public@yoctocell.xyz> Date: Sun, 07 Nov 2021 12:36:19 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 2.9 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: * doc/guix.texi (Shells Home Services): Document it. * gnu/home/services/shells.scm (bash-serialize-aliases): New procedure. (home-bash-configuration, home-bash-extension): Add ‘aliases’ field. (h [...] Content analysis details: (2.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS 0.0 PDS_RDNS_DYNAMIC_FP RDNS_DYNAMIC with FP steps X-Debbugs-Envelope-To: 51543 Cc: Liliana Marie Prikler X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.9 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: * doc/guix.texi (Shells Home Services): Document it. * gnu/home/services/shells.scm (bash-serialize-aliases): New procedure. (home-bash-configuration, home-bash-extension): Add ‘aliases’ field. (h [...] Content analysis details: (1.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager 0.0 PDS_RDNS_DYNAMIC_FP RDNS_DYNAMIC with FP steps * doc/guix.texi (Shells Home Services): Document it. * gnu/home/services/shells.scm (bash-serialize-aliases): New procedure. (home-bash-configuration, home-bash-extension): Add =E2=80=98aliases=E2=80= =99 field. (home-bash-extensions): Adjust accordingly. * guix/scripts/home/import.scm (generate-bash-configuration+modules): Popul= ate the =E2=80=98alias=E2=80=99 field. --- doc/guix.texi | 14 ++++++ gnu/home/services/shells.scm | 83 ++++++++++++++++++++++++++---------- guix/scripts/home/import.scm | 24 +++++++++++ 3 files changed, 98 insertions(+), 23 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index ea1973f02c..f7312a5b30 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -36173,6 +36173,20 @@ @item @code{environment-variables} (default: @code{()}) (type: alist) Association list of environment variables to set for the Bash session. =20 +@item @code{aliases} (default: @code{()}) (type: alist) +Association list of aliases to set for the Bash session. The alias will +automatically be quoted, so something line this: + +@lisp +'((\"ls\" . \"ls -alF\")) +@end lisp + +turns into + +@example +alias ls=3D\"ls -alF\" +@end example + @item @code{bash-profile} (default: @code{()}) (type: text-config) List of file-like objects, which will be added to @file{.bash_profile}. Used for executing user's commands at start of login shell (In most diff --git a/gnu/home/services/shells.scm b/gnu/home/services/shells.scm index e2730967b2..f24e47f762 100644 --- a/gnu/home/services/shells.scm +++ b/gnu/home/services/shells.scm @@ -305,6 +305,18 @@ (define home-zsh-service-type ;;; Bash. ;;; =20 +(define (bash-serialize-aliases field-name val) + #~(string-append + #$@(map + (match-lambda + ((key . #f) + "") + ((key . #t) + #~(string-append "alias " #$key "\n")) + ((key . value) + #~(string-append "alias " #$key "=3D\"" #$value "\"\n"))) + val))) + (define-configuration home-bash-configuration (package (package bash) @@ -317,6 +329,21 @@ (define-configuration home-bash-configuration (alist '()) "Association list of environment variables to set for the Bash session." serialize-posix-env-vars) + (aliases + (alist '()) + "Association list of aliases to set for the Bash session. The alias wi= ll +automatically be quoted, so something line this: + +@lisp +'((\"ls\" . \"ls -alF\")) +@end lisp + +turns into + +@example +alias ls=3D\"ls -alF\" +@end example" + bash-serialize-aliases) (bash-profile (text-config '()) "List of file-like objects, which will be added to @file{.bash_profile}. @@ -387,10 +414,10 @@ (define* (file-if-not-empty field #:optional (extra-c= ontent #f)) (if (or extra-content (not (null? ((configuration-field-getter field-obj) config))= )) `(,(object->snake-case-string file-name) - ,(mixed-text-file + ,(apply mixed-text-file (object->snake-case-string file-name) - (if extra-content extra-content "") - (serialize-field field))) + (cons (serialize-field field) + (if extra-content extra-content '())))) '()))) =20 (filter @@ -413,8 +440,8 @@ (define* (file-if-not-empty field #:optional (extra-con= tent #f)) ,@(list (file-if-not-empty 'bashrc (if (home-bash-configuration-guix-defaults? config) - guix-bashrc - #f)) + (list (serialize-field 'aliases) guix-bashrc) + (list (serialize-field 'alises)))) (file-if-not-empty 'bash-logout))))) =20 (define (add-bash-packages config) @@ -424,6 +451,9 @@ (define-configuration/no-serialization home-bash-extens= ion (environment-variables (alist '()) "Association list of environment variables to set.") + (aliases + (alist '()) + "Association list of aliases to set.") (bash-profile (text-config '()) "List of file-like objects.") @@ -435,24 +465,31 @@ (define-configuration/no-serialization home-bash-exte= nsion "List of file-like objects.")) =20 (define (home-bash-extensions original-config extension-configs) - (home-bash-configuration - (inherit original-config) - (environment-variables - (append (home-bash-configuration-environment-variables original-config) - (append-map - home-bash-extension-environment-variables extension-configs))) - (bash-profile - (append (home-bash-configuration-bash-profile original-config) - (append-map - home-bash-extension-bash-profile extension-configs))) - (bashrc - (append (home-bash-configuration-bashrc original-config) - (append-map - home-bash-extension-bashrc extension-configs))) - (bash-logout - (append (home-bash-configuration-bash-logout original-config) - (append-map - home-bash-extension-bash-logout extension-configs))))) + (match original-config + (($ _ _ _ environment-variables aliases + bash-profile bashrc bash-logout) + (home-bash-configuration + (inherit original-config) + (environment-variables + (append environment-variables + (append-map + home-bash-extension-environment-variables extension-config= s))) + (aliases + (append aliases + (append-map + home-bash-extension-aliases extension-configs))) + (bash-profile + (append bash-profile + (append-map + home-bash-extension-bash-profile extension-configs))) + (bashrc + (append bashrc + (append-map + home-bash-extension-bashrc extension-configs))) + (bash-logout + (append bash-logout + (append-map + home-bash-extension-bash-logout extension-configs))))))) =20 (define home-bash-service-type (service-type (name 'home-bash) diff --git a/guix/scripts/home/import.scm b/guix/scripts/home/import.scm index 7a7712dd96..fbf89069a7 100644 --- a/guix/scripts/home/import.scm +++ b/guix/scripts/home/import.scm @@ -27,6 +27,9 @@ (define-module (guix scripts home import) #:use-module (gnu packages) #:use-module (ice-9 match) #:use-module (ice-9 pretty-print) + #:use-module (ice-9 rdelim) + #:use-module (ice-9 regex) + #:use-module (ice-9 popen) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) #:export (import-manifest @@ -56,11 +59,32 @@ (define (generate-bash-configuration+modules destinatio= n-directory) (define (destination-append path) (string-append destination-directory "/" path)) =20 + (define (bash-alias->pair line) + (if (string-prefix? "alias" line) + (let ((matched (string-match "alias (.+)=3D\"?'?([^\"']+)\"?'?" li= ne))) + `(,(match:substring matched 1) . ,(match:substring matched 2))) + '())) +=20=20 + (define (parse-aliases input) + (let loop ((line (read-line input)) + (result '())) + (if (eof-object? line) + (reverse result) + (loop (read-line input) + (cons (bash-alias->pair line) result))))) + (let ((rc (destination-append ".bashrc")) (profile (destination-append ".bash_profile")) (logout (destination-append ".bash_logout"))) `((service home-bash-service-type (home-bash-configuration + ,@(if (file-exists? rc) + `((aliases + ',(let* ((port (open-pipe* OPEN_READ "bash" "-i" = "-c" "alias")) + (alist (parse-aliases port))) + (close-port port) + (filter (negate null?) alist)))) + '()) ,@(if (file-exists? rc) `((bashrc (list (local-file ,rc --=20 2.33.0 From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 07 06:36:45 2021 Received: (at 51543) by debbugs.gnu.org; 7 Nov 2021 11:36:46 +0000 Received: from localhost ([127.0.0.1]:51944 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjgTW-0004WF-GE for submit@debbugs.gnu.org; Sun, 07 Nov 2021 06:36:45 -0500 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:49780 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjgTT-0004W2-89 for 51543@debbugs.gnu.org; Sun, 07 Nov 2021 06:36:36 -0500 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1636284989; bh=lMffuArsVcCmu18iEZfuSTf1rEFtaLT8ofBbz2IKIkA=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=gzjud+RL5+guLXRK8F8wAy/TUGynEQFhe6kC8xavzhfVkov3SEASqoOOxv0XqYpkY jDQaZVzteFgjyJrlu+JRsqXYpza+f4d6vCQ6AWM9MJCOqPrDXSqvjufV8VFFy9dWhn 5H92I1kv06CrJTJwKnvmXypbO+pmTQvWQW/5T9bI= To: 51543@debbugs.gnu.org Subject: [PATCH v3 2/2] doc: Improve documentation of the Bash home service In-Reply-To: References: Message-Id: <8945ebff245fc62c8ba59133e3116b6f68d0aa9c.1636284793.git.public@yoctocell.xyz> Date: Sun, 07 Nov 2021 12:36:29 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 2.9 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: * doc/guix.texi (Shells Home Services): Document ‘home-bash-extension’ configuration record. * gnu/home/services/shells.scm (generate-home-bash-documentation): Extract docstrings from ‘home-bash [...] Content analysis details: (2.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS 0.0 PDS_RDNS_DYNAMIC_FP RDNS_DYNAMIC with FP steps X-Debbugs-Envelope-To: 51543 Cc: Liliana Marie Prikler X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.9 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: * doc/guix.texi (Shells Home Services): Document ‘home-bash-extension’ configuration record. * gnu/home/services/shells.scm (generate-home-bash-documentation): Extract docstrings from ‘home-bash [...] Content analysis details: (1.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 T_SPF_TEMPERROR SPF: test of record failed (temperror) 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager 0.0 PDS_RDNS_DYNAMIC_FP RDNS_DYNAMIC with FP steps * doc/guix.texi (Shells Home Services): Document =E2=80=98home-bash-extensi= on=E2=80=99 configuration record. * gnu/home/services/shells.scm (generate-home-bash-documentation): Extract docstrings from =E2=80=98home-bash-extension=E2=80=99. (home-bash-configuration): Expound on docstrings. (home-bash-extension): Likewise. Fixes: --- doc/guix.texi | 50 ++++++++++++++++++++++++++++++++---- gnu/home/services/shells.scm | 45 ++++++++++++++++++++++---------- 2 files changed, 76 insertions(+), 19 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index f7312a5b30..db1bf6efa7 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -36159,6 +36159,7 @@ =20 @subsubheading Bash Home Service =20 +@anchor{home-bash-configuration} @deftp {Data Type} home-bash-configuration Available @code{home-bash-configuration} fields are: =20 @@ -36167,15 +36168,20 @@ The Bash package to use. =20 @item @code{guix-defaults?} (default: @code{#t}) (type: boolean) -Add sane defaults like reading @file{/etc/bashrc}, coloring output for -@code{ls} provided by guix to @file{.bashrc}. +Add sane defaults like reading @file{/etc/bashrc} and coloring the output = of +@command{ls} to the end of the @file{.bashrc} file. =20 @item @code{environment-variables} (default: @code{()}) (type: alist) -Association list of environment variables to set for the Bash session. +Association list of environment variables to set for the Bash session. The +rules for the @code{home-environment-variables-service-type} apply +here (@pxref{Essential Home Services}). The contents of this field will be +added after the contents of the @code{bash-profile} field. =20 @item @code{aliases} (default: @code{()}) (type: alist) -Association list of aliases to set for the Bash session. The alias will -automatically be quoted, so something line this: +Association list of aliases to set for the Bash session. The aliases +will be defined after the contents of the @code{bashrc} field has been +put in the @file{.bashrc} file. The alias will automatically be quoted, +so something line this: =20 @lisp '((\"ls\" . \"ls -alF\")) @@ -36206,7 +36212,41 @@ process for example). =20 @end table +@end deftp + +You can extend the Bash service by using the @code{home-bash-extension} +configuration record, whose fields most mirror that of +@code{home-bash-configuration} (@pxref{home-bash-configuration}). The +contents of the extensions will be added to the end of the corresponding +Bash configuration files (@pxref{Bash Startup Files,,, bash, The GNU +Bash Reference Manual}. + +@deftp {Data Type} home-bash-extension +Available @code{home-bash-extension} fields are: + +@table @asis +@item @code{environment-variables} (default: @code{()}) (type: alist) +Additional environment variables to set. These will be combined with the +environment variables from other extensions and the base service to form o= ne +coherent block of environment variables. + +@item @code{aliases} (default: @code{()}) (type: alist) +Additional aliases to set. These will be combined with the aliases from +other extensions and the base service. =20 +@item @code{bash-profile} (default: @code{()}) (type: text-config) +Additional text blocks to add to @file{.bash_profile}, which will be combi= ned +with text blocks from other extensions and the base service. + +@item @code{bashrc} (default: @code{()}) (type: text-config) +Additional text blocks to add to @file{.bashrc}, which will be combined +with text blocks from other extensions and the base service. + +@item @code{bash-logout} (default: @code{()}) (type: text-config) +Additional text blocks to add to @file{.bash_logout}, which will be combin= ed +with text blocks from other extensions and the base service. + +@end table @end deftp =20 @subsubheading Zsh Home Service diff --git a/gnu/home/services/shells.scm b/gnu/home/services/shells.scm index f24e47f762..81d07da86c 100644 --- a/gnu/home/services/shells.scm +++ b/gnu/home/services/shells.scm @@ -323,16 +323,21 @@ (define-configuration home-bash-configuration "The Bash package to use.") (guix-defaults? (boolean #t) - "Add sane defaults like reading @file{/etc/bashrc}, coloring output -for @code{ls} provided by guix to @file{.bashrc}.") + "Add sane defaults like reading @file{/etc/bashrc} and coloring the out= put of +@command{ls} to the end of the @file{.bashrc} file.") (environment-variables (alist '()) - "Association list of environment variables to set for the Bash session." + "Association list of environment variables to set for the Bash session.= The +rules for the @code{home-environment-variables-service-type} apply +here (@pxref{Essential Home Services}). The contents of this field will be +added after the contents of the @code{bash-profile} field." serialize-posix-env-vars) (aliases (alist '()) - "Association list of aliases to set for the Bash session. The alias wi= ll -automatically be quoted, so something line this: + "Association list of aliases to set for the Bash session. The aliases = will be +defined after the contents of the @code{bashrc} field has been put in the +@file{.bashrc} file. The alias will automatically be quoted, so something= line +this: =20 @lisp '((\"ls\" . \"ls -alF\")) @@ -450,19 +455,25 @@ (define (add-bash-packages config) (define-configuration/no-serialization home-bash-extension (environment-variables (alist '()) - "Association list of environment variables to set.") + "Additional environment variables to set. These will be combined with = the +environment variables from other extensions and the base service to form o= ne +coherent block of environment variables.") (aliases (alist '()) - "Association list of aliases to set.") + "Additional aliases to set. These will be combined with the aliases fr= om +other extensions and the base service.") (bash-profile (text-config '()) - "List of file-like objects.") + "Additional text blocks to add to @file{.bash_profile}, which will be c= ombined +with text blocks from other extensions and the base service.") (bashrc (text-config '()) - "List of file-like objects.") + "Additional text blocks to add to @file{.bashrc}, which will be combined +with text blocks from other extensions and the base service.") (bash-logout (text-config '()) - "List of file-like objects.")) + "Additional text blocks to add to @file{.bash_logout}, which will be co= mbined +with text blocks from other extensions and the base service.")) =20 (define (home-bash-extensions original-config extension-configs) (match original-config @@ -646,10 +657,16 @@ (define (generate-home-shell-profile-documentation) 'home-shell-profile-configuration)) =20 (define (generate-home-bash-documentation) - (generate-documentation - `((home-bash-configuration - ,home-bash-configuration-fields)) - 'home-bash-configuration)) + (string-append + (generate-documentation + `((home-bash-configuration + ,home-bash-configuration-fields)) + 'home-bash-configuration) + "\n\n" + (generate-documentation + `((home-bash-extension + ,home-bash-extension-fields)) + 'home-bash-extension))) =20 (define (generate-home-zsh-documentation) (generate-documentation --=20 2.33.0 From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 07 15:18:25 2021 Received: (at 51543) by debbugs.gnu.org; 7 Nov 2021 20:18:25 +0000 Received: from localhost ([127.0.0.1]:54916 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjocT-00029s-8q for submit@debbugs.gnu.org; Sun, 07 Nov 2021 15:18:25 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:47090) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjocO-00029c-DH for 51543@debbugs.gnu.org; Sun, 07 Nov 2021 15:18:23 -0500 Received: by mail-wr1-f68.google.com with SMTP id u1so23262242wru.13 for <51543@debbugs.gnu.org>; Sun, 07 Nov 2021 12:18:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=SzZ7Jkx0QvIWjQaOldX2t6BZwttq58p033vp605vkRc=; b=DPoN9yBVOD4wRixCgNWP6KyjBuvgIlIU+Cw9h0BIGsRBxbVX8+QG6JtLU0S1aKq+eB bSxVOpY/arR6SO+hw3KASjLa3cpxI6Y1Wl8XEsS0UUHz936KcRd3VvEgSmH1Df16XmH/ Wq6F1lbOsGicImL73ScDl9u++nGuQFwz3QY+3PkwMKsIcfQ+Y1ZD7KHFgpDx3I5x5jfr d9Yj+gKU4TF6u9ypsS/X/xTKKM10y0f3puPPpB9ECEU2ECL5XOjHoZuA4rxsB90tbuDv R0mjKFZRH5NVuF46SeilFXoCryWdfSSF2VsiB5OsbPsUtqYJJv+Pk17a4m9GTWtZov7L 6XKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=SzZ7Jkx0QvIWjQaOldX2t6BZwttq58p033vp605vkRc=; b=jFtYkQYK5otZ5biDg7Y6cq6JNZPEUgQcQ2DFM5rXQc/FB+QhFr8Xxw1XYqdR8/D8wN Zef6sNh6lEq3pAuxJ3yPnMJ2lCy53P2h5eSFrk5ruCNl+mFAA7yVJl+kbj4B662yu23h Uv1Fb2EdnQeQ80D2lGu7k9GDBAk3Hf54eY8coHY4pEBQB66ZniGryS768ydGdla/x1PG rqCYnbbdKMWnLc8JTtE2AF/1EBAMdH8PlcQzzX3kCNW3Q3DaiC3yVplFJ1IdC6BNVBXP vEYZNjZATmmiJX0NDDFyNDY7OQ7ReNSQmgNDtV+fLRZKT7lcCBLYQi6gxQ9x1BYi84m7 ME/w== X-Gm-Message-State: AOAM530czLCecO2BCdEJE3En9GBgl6o17FOMDSjs+M/N2eO6dS3c/ywv KncN7kF3NNnLJ+Vjq1ctV96QIXUydc4T1w== X-Google-Smtp-Source: ABdhPJw0Gfx5v0YcXGR2YyIbdgUR6Gx0Eae2IJr7D+c74slfaKC3VHZA6QwKasURYy7jn3QAjk3ZRA== X-Received: by 2002:a05:6000:1a8b:: with SMTP id f11mr62256807wry.409.1636316294249; Sun, 07 Nov 2021 12:18:14 -0800 (PST) Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id d15sm10836207wri.50.2021.11.07.12.18.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Nov 2021 12:18:13 -0800 (PST) Message-ID: <6a6c007ff1a9746b47ee0ba00e16db38fd38d244.camel@gmail.com> Subject: Re: [PATCH v3 2/2] doc: Improve documentation of the Bash home service From: Liliana Marie Prikler To: Xinglu Chen , 51543@debbugs.gnu.org Date: Sun, 07 Nov 2021 21:18:12 +0100 In-Reply-To: <8945ebff245fc62c8ba59133e3116b6f68d0aa9c.1636284793.git.public@yoctocell.xyz> References: <8945ebff245fc62c8ba59133e3116b6f68d0aa9c.1636284793.git.public@yoctocell.xyz> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 51543 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Am Sonntag, den 07.11.2021, 12:36 +0100 schrieb Xinglu Chen: > * doc/guix.texi (Shells Home Services): Document ‘home-bash- > extension’ > configuration record. > * gnu/home/services/shells.scm (generate-home-bash-documentation): > Extract > docstrings from ‘home-bash-extension’. > (home-bash-configuration): Expound on docstrings. > (home-bash-extension): Likewise. > > Fixes: The docstrings LGTM now. This series is probably safe to go to master, though you might want to wait for people to complain about the addition of a field possibly breaking ABI and what not :P Cheers From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 07 15:58:11 2021 Received: (at 51543-done) by debbugs.gnu.org; 7 Nov 2021 20:58:11 +0000 Received: from localhost ([127.0.0.1]:55016 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjpEx-0007Y0-Fm for submit@debbugs.gnu.org; Sun, 07 Nov 2021 15:58:11 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41208) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjpEv-0007Xm-6P for 51543-done@debbugs.gnu.org; Sun, 07 Nov 2021 15:58:09 -0500 Received: from [2001:470:142:3::e] (port=55752 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mjpEp-0008JF-JJ; Sun, 07 Nov 2021 15:58:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=MBVXDbIDdHtgIkAnFp+b/jZccmsp2K8C9xaDT+4RGSo=; b=GKziREXXkqu/KaVnoL8c SJ4WVBoZLERm9cR2PzbJww9gGz/tTEg4D5ujmjpNUagO6bSor+79hRLjZ95uK6F6bvgUEbTILckBj D3Ybmxi1TJSfl6Hh6VW+ZF9700/IPgbAf+Fnc2bw/G1KGhZfHKKnFvGw91zSub5cvCU85jZQsGQbm +397MZGXFnDksTUXdCRd/Le+OzAgACx6+pkDLlukipHEymtr/BGtmWvLmeOui0ghut4L+BO8J9pt3 f10jYpflmfKxqcxRAanTsfEoPV1iMmfhciRqnZRCb3kmsYTGwOYhxkKdbnMECur6gouYI5BBefjcT r5Ap06rTsuUiPA==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:55544 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mjpEp-0002bM-8h; Sun, 07 Nov 2021 15:58:03 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Xinglu Chen Subject: Re: bug#51543: [PATCH 0/2] Some improvements to the Bash home service References: Date: Sun, 07 Nov 2021 21:58:00 +0100 In-Reply-To: (Xinglu Chen's message of "Sun, 07 Nov 2021 12:36:12 +0100") Message-ID: <87zgqfk7jb.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.3 (/) X-Debbugs-Envelope-To: 51543-done Cc: 51543-done@debbugs.gnu.org, Liliana Marie Prikler X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.3 (-) Hello, Xinglu Chen skribis: > home: services: bash: Add =E2=80=98aliases=E2=80=99 field. > doc: Improve documentation of the Bash home service Applied, thanks! Liliana Marie Prikler skribis: > The docstrings LGTM now. This series is probably safe to go to master, > though you might want to wait for people to complain about the addition > of a field possibly breaking ABI and what not :P Users won=E2=80=99t see any ABI breakage so I think we=E2=80=99re fine. Ap= plied! Thanks Xinglu & Liliana! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 13 15:36:10 2021 Received: (at 51543) by debbugs.gnu.org; 13 Nov 2021 20:36:10 +0000 Received: from localhost ([127.0.0.1]:48280 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mlzks-0002HV-Re for submit@debbugs.gnu.org; Sat, 13 Nov 2021 15:36:10 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37628) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mlzko-0002Gw-D0 for 51543@debbugs.gnu.org; Sat, 13 Nov 2021 15:36:05 -0500 Received: from [2001:470:142:3::e] (port=60684 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mlzki-0003YG-ET; Sat, 13 Nov 2021 15:35:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=bejtidnyS0JzmHUr7Xw2c9a0hd+7GPgy8Ip+pVROtj8=; b=ocQaow7QbeeU16Gqe96T 9bVbG1ua6FPytviiqQE5ddi1GE82nd73v2s1ogY4p3QgVuemNxEvt3oTslV7eBMvn3o9tcMZ/Pyp4 695lOqIB4qcMf+Z2tWokeiLjzVev2fu2cXPYTML/MJBVqbix34o9Eisv8qN7YbGd1yoJv35fGR0uP SUOkEpzjgCaG9171avwu0LLn4wyxTAGCkqc2OrMEk2xnosKKpN9qErRkmAPs1LZ3Zg8XmbofUM8Xi 3WB8F0sspssuPT3sOZQ8tqR8Df6A0fBiv0ksUhtpLfBMA/q/HT8O8Y3nBgvzdErthWEKh+BIDrCQn gPIUUmZYsvM3nA==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:51664 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mlzki-0006ER-5w; Sat, 13 Nov 2021 15:35:56 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Xinglu Chen Subject: Re: bug#51543: [PATCH 0/2] Some improvements to the Bash home service References: Date: Sat, 13 Nov 2021 21:35:52 +0100 In-Reply-To: (Xinglu Chen's message of "Sun, 07 Nov 2021 12:36:12 +0100") Message-ID: <87r1bjbxp3.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.3 (/) X-Debbugs-Envelope-To: 51543 Cc: Liliana Marie Prikler , 51543@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.3 (-) Hi! Xinglu Chen skribis: > home: services: bash: Add =E2=80=98aliases=E2=80=99 field. > doc: Improve documentation of the Bash home service I had overlooked it but it breaks tests/guix-home.sh and tests/home-import.scm. Could you take a look and send a patch in a new issue? Thanks, Ludo=E2=80=99. From unknown Fri Sep 05 07:33:11 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 12 Dec 2021 12:24:08 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator