Compare commits

...

4 commits

Author SHA1 Message Date
Hippolyte Chauvin
ad01f94bdb Ajout : brackets dans la configuration de bash pour tera-io 2023-10-13 09:40:03 +02:00
Hippolyte Chauvin
02c351baa7 Correction : backslash pour autoriser l'interprétation du $ dans le PS1 2023-10-13 09:33:12 +02:00
Hippolyte Chauvin
231211b7c4 Remaniement : noms des fichiers dans /etc/sh/shrc.d 2023-10-13 09:29:50 +02:00
Hippolyte Chauvin
8d38397249 Remaniement : configuration system-wide de bash 2023-10-13 09:24:44 +02:00
11 changed files with 25 additions and 39 deletions

View file

@ -0,0 +1,3 @@
ps1_brackets='()'
ps1_color_1=32
ps1_color_2=34

View file

@ -0,0 +1,3 @@
ps1_brackets='[]'
ps1_color_1=35
ps1_color_2=34

View file

@ -0,0 +1,5 @@
ps1_brackets='{}'
ps1_color_1=36
ps1_color_2=34
export SYSTEMD_PAGER=

View file

@ -0,0 +1,14 @@
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

View file

@ -1,10 +0,0 @@
# PS1
if [ "$(id -u)" -eq 0 ]; then
ps1_color_1=1
ps1_color_2=10
else
ps1_color_1=2
ps1_color_2=4
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)\]"

View file

@ -1,10 +0,0 @@
# PS1
if [ "$(id -u)" -eq 0 ]; then
ps1_color_1=1
ps1_color_2=10
else
ps1_color_1=5
ps1_color_2=4
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)\]"

View file

@ -1,7 +0,0 @@
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,12 +0,0 @@
# PS1
if [ "$(id -u)" -eq 0 ]; then
ps1_color_1=1
ps1_color_2=10
else
ps1_color_1=6
ps1_color_2=4
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 SYSTEMD_PAGER=