From: Vincent Le Gallic Date: Thu, 25 Jul 2013 23:53:09 +0000 (+0200) Subject: Une variable pour choisir di on VCS ou pas, c'est mieux qu'un #~# X-Git-Url: http://gitweb.pimeys.fr/?p=config-20-100.git;a=commitdiff_plain;h=6243d890f6518bafc92d0ffe39095892f600ec21 Une variable pour choisir di on VCS ou pas, c'est mieux qu'un #~# --- diff --git a/.bashrc b/.bashrc index d2135e1..c6b727a 100644 --- a/.bashrc +++ b/.bashrc @@ -171,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 @@ -193,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