Skip to content

Commit

Permalink
feat: add Azure DevOps git source and config for projects
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinocossar committed Apr 1, 2023
1 parent 410b905 commit 30f8a4e
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ themes/*

# Git
git/.gitconfig_glab_ce_*
git/.gitconfig_azure_devops
2 changes: 2 additions & 0 deletions git/.gitconfig
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,7 @@
path = ~/.oh-my-custom-zsh/git/.gitconfig_ghub_com_personal
[includeIf "gitdir:~/.oh-my-custom-zsh/"]
path = ~/.oh-my-custom-zsh/git/.gitconfig_ghub_com_personal
[includeIf "gitdir:~/Workspace/Beliven - Azure DevOps/"]
path = ~/.oh-my-custom-zsh/git/.gitconfig_azure_devops
[includeIf "gitdir:~/Workspace/AQuest - GitLab CE/"]
path = ~/.oh-my-custom-zsh/git/.gitconfig_glab_ce_aquest
4 changes: 4 additions & 0 deletions git/.gitconfig_azure_devops
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[user]
name = Valentino Cossar
email = valentinoc.cossar@beliven.com
username = valentino.cossar
23 changes: 23 additions & 0 deletions oh-my-custom-zsh.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,22 @@ ghubp() {
return
}

ado() {
WORKSPACE_PATH="$HOME/Workspace/Beliven - Azure DevOps"
PROJ=$1

if [ ! -d "$WORKSPACE_PATH/$PROJ" ] && [ "$WORKSPACE_PATH/$PROJ" != "" ]; then
echo "'$PROJ' is not a directory project or not exists!"
else
if [ "$PROJ" = "" ]; then
cd "$WORKSPACE_PATH"
else
cd "$WORKSPACE_PATH/$PROJ"
fi
fi
return
}

aquest() {
WORKSPACE_PATH="$HOME/Workspace/AQuest - GitLab CE"
PROJ=$1
Expand Down Expand Up @@ -218,6 +234,13 @@ _ghubp() {
}
compdef _ghubp ghubp

_ado() {
WORKSPACE_PATH="$HOME/Workspace/Beliven - Azure DevOps"
DIRS=(`ls -d "$WORKSPACE_PATH"/*/ | tr -d ' ' | xargs basename | tr '\n' ' '`)
compadd -X "Select a 'Beliven - Azure DevOps' project:" $DIRS
}
compdef _ado ado

_aquest() {
WORKSPACE_PATH="$HOME/Workspace/AQuest - GitLab CE"
DIRS=(`ls -d "$WORKSPACE_PATH"/*/ | tr -d ' ' | xargs basename | tr '\n' ' '`)
Expand Down

0 comments on commit 30f8a4e

Please sign in to comment.