From 4d22f92c76668efd027bc5de49c2a85451a86def Mon Sep 17 00:00:00 2001 From: Hippolyte Chauvin Date: Sat, 14 Oct 2023 14:30:03 +0200 Subject: [PATCH] =?UTF-8?q?Remaniement=20:=20modularisation=20de=20la=20co?= =?UTF-8?q?nfiguration=20de=20bash,=20r=C3=A9glage=20du=20PS1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- etc/bash/bashrc.d/50-ahurac.bashrc | 14 -------------- etc/bash/bashrc.d/50-common_sh_directives.bashrc | 7 +++++++ etc/bash/bashrc.d/50-ps1.bashrc | 7 +++++++ 3 files changed, 14 insertions(+), 14 deletions(-) delete mode 100644 etc/bash/bashrc.d/50-ahurac.bashrc create mode 100644 etc/bash/bashrc.d/50-common_sh_directives.bashrc create mode 100644 etc/bash/bashrc.d/50-ps1.bashrc diff --git a/etc/bash/bashrc.d/50-ahurac.bashrc b/etc/bash/bashrc.d/50-ahurac.bashrc deleted file mode 100644 index e3e9017..0000000 --- a/etc/bash/bashrc.d/50-ahurac.bashrc +++ /dev/null @@ -1,14 +0,0 @@ -if [ "$(id -u)" -eq 0 ]; then - ps1_color_1=31 - ps1_color_2=32 -fi - -PS1="\033[0m${ps1_brackets:0:1}\033[1;${ps1_color_1}m\u@\h\033[0m \033[1;${ps1_color_2}m\W\033[0m${ps1_brackets:1:1}\\$ " - -shrc_d=/usr/local/etc/sh/shrc.d -if [ -d "$shrc_d" ]; then - for i in "${shrc_d}/"*; do - . "$i" - done -fi - diff --git a/etc/bash/bashrc.d/50-common_sh_directives.bashrc b/etc/bash/bashrc.d/50-common_sh_directives.bashrc new file mode 100644 index 0000000..9cc867e --- /dev/null +++ b/etc/bash/bashrc.d/50-common_sh_directives.bashrc @@ -0,0 +1,7 @@ +shrc_d=/usr/local/etc/sh/shrc.d +if [ -d "$shrc_d" ]; then + for i in "${shrc_d}/"*; do + . "$i" + done +fi + diff --git a/etc/bash/bashrc.d/50-ps1.bashrc b/etc/bash/bashrc.d/50-ps1.bashrc new file mode 100644 index 0000000..a146885 --- /dev/null +++ b/etc/bash/bashrc.d/50-ps1.bashrc @@ -0,0 +1,7 @@ +if [ "$(id -u)" -eq 0 ]; then + ps1_color_1=31 + ps1_color_2=32 +fi + +PS1="\\033[0m${ps1_brackets:0:1}\\033[1;${ps1_color_1}m\\u@\\h\\033[0m \\033[1;${ps1_color_2}m\\W\\033[0m${ps1_brackets:1:1}\\$ " +