From 5aa1d0c0e8069bdce3ff938948bfaeeb1e10c834 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Fri, 14 Jul 2023 00:27:58 -0700 Subject: [PATCH] =?UTF-8?q?Add=20an=20indication=20to=20my=20zsh=20prompt?= =?UTF-8?q?=20that=20I'm=20using=20=E2=80=98guix=20shell=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- oni/home/config/common.scm | 3 ++- oni/home/config/zsh/guix-environment.zsh | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 oni/home/config/zsh/guix-environment.zsh diff --git a/oni/home/config/common.scm b/oni/home/config/common.scm index 71747ad..df1ff49 100644 --- a/oni/home/config/common.scm +++ b/oni/home/config/common.scm @@ -109,7 +109,8 @@ "}\n" "preexec_functions+=(horizontal-rule)\n" "precmd_functions+=(horizontal-rule)\n" - "PROMPT=\"%T \\$(spwd) %B%(?.%F{2}.%F{1}[%?])>%b%f \"")))))) + "PROMPT=\"%T \\$(spwd) %B%(?.%F{2}.%F{1}[%?])>%b%f \"") + (local-file "zsh/guix-environment.zsh")))))) (define home-guile-service (service home-guile-service-type diff --git a/oni/home/config/zsh/guix-environment.zsh b/oni/home/config/zsh/guix-environment.zsh new file mode 100644 index 0000000..9adf39f --- /dev/null +++ b/oni/home/config/zsh/guix-environment.zsh @@ -0,0 +1,3 @@ +if [ -n "$GUIX_ENVIRONMENT" ]; then + export PROMPT="[dev] $PROMPT" +fi