Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
Config_Files
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Maxime Bombar
Config_Files
Commits
7f7c09cf
Commit
7f7c09cf
authored
Jul 22, 2013
by
Valentin Samir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extanded get_vcs_info, their are other vcs than git and darcs
parent
fd756878
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
14 deletions
+21
-14
.bashrc
.bashrc
+21
-14
No files found.
.bashrc
View file @
7f7c09cf
...
...
@@ -47,26 +47,33 @@ fi
#~# get_vcs_info () {
#~# # Donne les infos sur le dépôt VCS courant.
#~# # priorité à git, puis darcs
#~# local BRANCH TYPE violet orange vert
#~# local
LBRANCH LTYPE
BRANCH TYPE violet orange vert
#~# violet="\[\e[35m\]"
#~# orange="\[\e[33m\]"
#~# vert="\[\e[32m\]"
#~# nocolor="\[\e[0m\]"
#~# BRANCH=$(git branch 2>/dev/null | sed -r "s/^[^*].*$//" | paste -s -d '' | sed -r "s/^[*] //")
#~# if [ -n "$BRANCH" ];
#~# then
#~# TYPE="git"
#~# else
#~# BRANCH=$(darcs show repo 2>/dev/null| egrep '^ *Cache' | sed 's@.*/\([^/]*\),.*@\1@')
#~# if [ -n "$BRANCH" ];
#~# then
#~# TYPE="darcs"
#~# declare -a TYPE
#~# declare -a BRANCH
#~# TYPE[0]="git"
#~# TYPE[1]="mercurial"
#~# TYPE[2]="darcs"
#~# TYPE[3]="svn"
#~# BRANCH[0]='git branch 2>/dev/null | sed -r "s/^[^*].*$//" | paste -s -d "" | sed -r "s/^[*] //"'
#~# BRANCH[1]='hg branch 2>/dev/null'
#~# BRANCH[2]="darcs show repo 2>/dev/null| egrep '^ *Cache' | sed 's@.*/\([^/]*\),.*@\1@'"
#~# BRANCH[3]="svn info 2>/dev/null | head -n 6 | tail -n 1"
#~# for i in $(seq 0 $((${#BRANCH[*]}-1))); do
#~# LBRANCH=$(eval "${BRANCH[$i]}")
#~# if [ -n "$LBRANCH" ]; then
#~# LTYPE="${TYPE[$i]}"
#~# break
#~# fi
#~#
fi
#~# if [ -n "$TYPE" ];
#~#
done
#~# if [ -n "$
L
TYPE" ];
#~# then
#~# VCS_info="${nocolor}${violet}(${nocolor}$TYPE${violet})-${violet}[${vert}$BRANCH${violet}]${nocolor}"
#~# VCS_size=$((${#TYPE}+${#BRANCH}+5))
#~# echo $LTYPE
#~# VCS_info="${nocolor}${violet}(${nocolor}$LTYPE${violet})-${violet}[${vert}$LBRANCH${violet}]${nocolor}"
#~# VCS_size=$((${#LTYPE}+${#LBRANCH}+5))
#~# else
#~# VCS_info=""
#~# VCS_size=0
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment