Remaniement : séparation en plusieurs fichiers des configurations système de bash pour éviter la redondance du code

This commit is contained in:
Hippolyte Chauvin 2023-06-18 18:27:56 +02:00
parent b126f629a5
commit 78bd5d62ff
3 changed files with 7 additions and 18 deletions

View file

@ -1,5 +1,3 @@
# Lines added by ahurac
# PS1 # PS1
if [ "$(id -u)" -eq 0 ]; then if [ "$(id -u)" -eq 0 ]; then
ps1_color_1=1 ps1_color_1=1
@ -10,10 +8,3 @@ else
fi fi
export PS1="(\[$(tput sgr0)\]\[$(tput bold)\]\[\033[38;5;${ps1_color_1}m\]\u@\h\[$(tput sgr0)\] \[$(tput sgr0)\]\[$(tput bold)\]\[\033[38;5;${ps1_color_2}m\]\W\[$(tput sgr0)\])\\$ \[$(tput sgr0)\]" export PS1="(\[$(tput sgr0)\]\[$(tput bold)\]\[\033[38;5;${ps1_color_1}m\]\u@\h\[$(tput sgr0)\] \[$(tput sgr0)\]\[$(tput bold)\]\[\033[38;5;${ps1_color_2}m\]\W\[$(tput sgr0)\])\\$ \[$(tput sgr0)\]"
shrc_d=/usr/local/etc/sh/shrc.d
if [ -d "$shrc_d" ]; then
for i in "${shrc_d}/"*; do
. "$i"
done
fi

View file

@ -1,5 +1,3 @@
# Lines added by ahurac
# PS1 # PS1
if [ "$(id -u)" -eq 0 ]; then if [ "$(id -u)" -eq 0 ]; then
ps1_color_1=1 ps1_color_1=1
@ -10,10 +8,3 @@ else
fi fi
export PS1="[\[$(tput sgr0)\]\[$(tput bold)\]\[\033[38;5;${ps1_color_1}m\]\u@\h\[$(tput sgr0)\] \[$(tput sgr0)\]\[$(tput bold)\]\[\033[38;5;${ps1_color_2}m\]\W\[$(tput sgr0)\]]\\$ \[$(tput sgr0)\]" export PS1="[\[$(tput sgr0)\]\[$(tput bold)\]\[\033[38;5;${ps1_color_1}m\]\u@\h\[$(tput sgr0)\] \[$(tput sgr0)\]\[$(tput bold)\]\[\033[38;5;${ps1_color_2}m\]\W\[$(tput sgr0)\]]\\$ \[$(tput sgr0)\]"
shrc_d=/usr/local/etc/sh/shrc.d
if [ -d "$shrc_d" ]; then
for i in "${shrc_d}/"*; do
. "$i"
done
fi

View file

@ -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