From d27ae0faf60733d509bd6372fa02bb01be9a535a Mon Sep 17 00:00:00 2001 From: Marek Paśnikowski Date: Fri, 1 Nov 2024 09:42:36 +0100 Subject: fix(home): redefine the bash prompt for clean execution of the concept --- suweren/home.scm | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'suweren') diff --git a/suweren/home.scm b/suweren/home.scm index cd31e2d..5bc018f 100644 --- a/suweren/home.scm +++ b/suweren/home.scm @@ -53,11 +53,22 @@ ;; update-commands #:use-module (suweren update)) +(define bash-prompt-configuration-core + " PS1='\\n\\n\\t $?\\n\\u@\\H \\w\\n\\! ") + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + (define bash-prompt-configuration - (guix:gexp:mixed-text-file "newline-prompt" - "PS1=${PS1%?}\n" - "PS1=${PS1%?}\\n'$ '\n" - "PS1=\"\\n$PS1\"")) + (guix:gexp:mixed-text-file "bash-prompt" + "\n" + "if [ -n \"$GUIX_ENVIRONMENT\" ] \n" + "then\n" + bash-prompt-configuration-core + "[env] \\$ '\n" + "else\n" + bash-prompt-configuration-core + "\\$ '\n" + "fi")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -- cgit v1.2.3