diff --git a/.gitignore b/.gitignore index 8f810f0..de39ef6 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ themes/* # Git git/.gitconfig_glab_ce_* +git/.gitconfig_azure_devops diff --git a/git/.gitconfig b/git/.gitconfig index b490c22..f8e598c 100644 --- a/git/.gitconfig +++ b/git/.gitconfig @@ -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 diff --git a/git/.gitconfig_azure_devops b/git/.gitconfig_azure_devops new file mode 100644 index 0000000..a5505d4 --- /dev/null +++ b/git/.gitconfig_azure_devops @@ -0,0 +1,4 @@ +[user] + name = Valentino Cossar + email = valentinoc.cossar@beliven.com + username = valentino.cossar diff --git a/oh-my-custom-zsh.zsh b/oh-my-custom-zsh.zsh index 7439677..29ca1c0 100644 --- a/oh-my-custom-zsh.zsh +++ b/oh-my-custom-zsh.zsh @@ -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 @@ -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' ' '`)