Remaniement : séparation en plusieurs fichiers des configurations système de bash pour éviter la redondance du code
This commit is contained in:
parent
b126f629a5
commit
78bd5d62ff
3 changed files with 7 additions and 18 deletions
|
@ -1,5 +1,3 @@
|
|||
# Lines added by ahurac
|
||||
|
||||
# PS1
|
||||
if [ "$(id -u)" -eq 0 ]; then
|
||||
ps1_color_1=1
|
||||
|
@ -10,10 +8,3 @@ else
|
|||
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)\]"
|
||||
|
||||
shrc_d=/usr/local/etc/sh/shrc.d
|
||||
if [ -d "$shrc_d" ]; then
|
||||
for i in "${shrc_d}/"*; do
|
||||
. "$i"
|
||||
done
|
||||
fi
|
||||
|
|
@ -1,5 +1,3 @@
|
|||
# Lines added by ahurac
|
||||
|
||||
# PS1
|
||||
if [ "$(id -u)" -eq 0 ]; then
|
||||
ps1_color_1=1
|
||||
|
@ -10,10 +8,3 @@ else
|
|||
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)\]"
|
||||
|
||||
shrc_d=/usr/local/etc/sh/shrc.d
|
||||
if [ -d "$shrc_d" ]; then
|
||||
for i in "${shrc_d}/"*; do
|
||||
. "$i"
|
||||
done
|
||||
fi
|
||||
|
7
etc/bash/bashrc.d/ahurac.bashrc
Normal file
7
etc/bash/bashrc.d/ahurac.bashrc
Normal 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
|
||||
|
Loading…
Reference in a new issue