Skip to content
Snippets Groups Projects
Commit e72a11e4 authored by Valentin Samir's avatar Valentin Samir
Browse files
parents 8f680b85 6243d890
No related branches found
No related tags found
Loading
......@@ -116,25 +116,34 @@ function cd {
# les couleurs doivent être entourés de \[ et \] pour délimiter les caractères
# invisibles
cyan='\e[1;36m'
cyan_thin='\e[0;36m'
violet='\e[1;35m'
violet_thin='\e[0;35m'
jaune='\e[1;33m'
jaune_thin='\e[0;33m'
rouge='\e[1;31m'
rouge_thin='\e[0;31m'
vert='\e[1;32m'
vert_thin='\e[0;32m'
bleu='\e[1;34m'
bleu_thin='\e[0;34m'
blanc='\e[1;37m'
blanc_thin='\e[0;37m'
nocolor='\e[0m'
cyan_prompt="\[${cyan}\]"
cyan_thin_prompt="\[${cyan_thin}\]"
violet_prompt="\[${violet}\]"
violet_thin_prompt="\[${violet_thin}\]"
jaune_prompt="\[${jaune}\]"
jaune_thin_prompt="\[${jaune_thin}\]"
rouge_prompt="\[${rouge}\]"
rouge_thin_prompt="\[${rouge_thin}\]"
vert_prompt="\[${vert}\]"
vert_thin_prompt="\[${vert_thin}\]"
bleu_prompt="\[${bleu}\]"
bleu_thin_prompt="\[${bleu_thin}\]"
blanc_prompt="\[${blanc}\]"
blanc_thin_prompt="\[${blanc_thin}\]"
nocolor_prompt="\[${nocolor}\]"
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
......@@ -162,6 +171,11 @@ else
color_prompt=no
fi
# Est-ce qu'on veut que le prompt affiche les information sur l'éventuel dépôt
# versionné dans lequel on se trouve
#~# # Changez cette variable en "yes" pour l'afficher
display_vcs_info=no
# Génération de la ligne de "-"
function gen_minus_line
......@@ -184,9 +198,11 @@ function prompt_command
local pwd ERR DATE PROMPT DIR POST_DIR
(( SAVE_COLUMNS == COLUMNS )) || gen_minus_line
#~# # À décommenter si on veut des infos
#~# # quand on se trouve dans un dépôt versionné
#~# get_vcs_info
# À décommenter si on veut des infos
# quand on se trouve dans un dépôt versionné
if [ "$display_vcs_info" = yes ]; then
get_vcs_info
fi
pwd=${PWD/#$HOME/'~'}
if (( ${#pwd} + ${VCS_size} + 27 > COLUMNS )); then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment