=?ISO-8859-1?Q?=5BR=E9solu}?= Re: script .bashrc color prompt
From
jack-sparrow@21:1/5 to
All on Fri Mar 14 16:30:02 2025
# Couleurs ANSI
#Black='\[\e[0;30m\]' # Noir
#Red='\[\e[0;31m\]' # Rouge
#Green='\[\e[0;32m\]' # Vert
#Yellow='\[\e[0;33m\]' # Jaune
#Blue='\[\e[0;34m\]' # Bleu
#Purple='\[\e[0;35m\]' # Violet
#Cyan='\[\e[0;36m\]' # Cyan
#White='\[\e[0;37m\]' # Blanc
# Réinitialisation de la couleur
#NC='\[\e[m\]' # Réinitialisation de la couleur
# Exemple de PS1 coloré
PS1='\[\e[0;36m\]\t \[\e[0;32m\]\u@\h\[\e[0;35m\]
\w\[\e[0;36m\]\[\e[0;37m\]$ \[\e[0;37m\]'
# activer les couleurs dans ls et autres
# -x fichier
# Vrai si le fichier existe et est exécutable.
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors ~/.dircolors)" || eval
"$(dircolors)"
alias ls='ls -v --color=always'
alias diff='diff --color=always'
alias grep='grep --color=always'
alias dir='dir --color=always'
alias less='less -R'
fi
<html><head><style>pre,code,address {
margin: 0px;
}
h1,h2,h3,h4,h5,h6 {
margin-top: 0.2em;
margin-bottom: 0.2em;
}
ol,ul {
margin-top: 0em;
margin-bottom: 0em;
}
blockquote {
margin-top: 0em;
margin-bottom: 0em;
}
</style></head><body><div></div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div></div></blockquote><div><div style="width: 71ch;"># Couleurs ANSI</div><div style="width: 71ch;">#Black='\[\e[0;30m\]'
# Noir</div><div style="width: 71ch;">#Red='\[\e[0;31m\]' # Rouge</div><div style="width: 71ch;">#Green='\[\e[0;32m\]' # Vert</div><div style="width: 71ch;">#Yellow='\[\e[0;33m\]' # Jaune</div><div style="width: 71ch;">#Blue='\
[\e[0;34m\]' # Bleu</div><div style="width: 71ch;">#Purple='\[\e[0;35m\]' # Violet</div><div style="width: 71ch;">#Cyan='\[\e[0;36m\]' # Cyan</div><div style="width: 71ch;">#White='\[\e[0;37m\]' # Blanc</div><div style="width:
71ch;"><br></div><div style="width: 71ch;"># Réinitialisation de la couleur</div><div style="width: 71ch;">#NC='\[\e[m\]' # Réinitialisation de la couleur</div><div style="width: 71ch;"><br></div><div style="width: 71ch;"># Exemple de
PS1 coloré</div><div style="width: 71ch;">PS1='\[\e[0;36m\]\t \[\e[0;32m\]\u@\h\[\e[0;35m\] \w\[\e[0;36m\]\[\e[0;37m\]$ \[\e[0;37m\]'</div><div style="width: 71ch;"><br></div><div style="width: 71ch;"># activer les couleurs dans ls et autres</div><div
style="width: 71ch;"># -x fichier</div><div style="width: 71ch;"># Vrai si le fichier existe et est exécutable.</div><div style="width: 71ch;">if [ -x /usr/bin/dircolors ]; then</div><div style="width: 71ch;"> test -r ~/.dircolors &&
amp; eval "$(dircolors ~/.dircolors)" || eval</div><div style="width: 71ch;">"$(dircolors)"</div><div style="width: 71ch;"> alias ls='ls -v --color=always'</div><div style="width: 71ch;"> alias diff='diff --color=always'</div><div style="width:
71ch;"> alias grep='grep --color=always'</div><div style="width: 71ch;"> alias dir='dir --color=always'</div><div style="width: 71ch;"> alias less='less -R'</div><div style="width: 71ch;">fi</div></div><div><span></span></div></body></html>
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)