new aliases to configure the local repo git user

This commit is contained in:
MorganGeek 2020-07-23 07:26:33 +02:00
parent 0b19d1261d
commit f9d012072d
3 changed files with 11 additions and 1 deletions

View File

@ -39,3 +39,6 @@ alias ve='vim $HOME/.vimrc' # vimrc editing
alias ze='vim $HOME/.zshrc' # zsh profile editing alias ze='vim $HOME/.zshrc' # zsh profile editing
alias zf='vim $HOME/.zsh_functions' # edit zsh_functions alias zf='vim $HOME/.zsh_functions' # edit zsh_functions
alias za='vim $HOME/.zsh_aliases' # edit zsh_aliases alias za='vim $HOME/.zsh_aliases' # edit zsh_aliases
# Quick editing
alias checkthis='arrow "type Ctrl+Z When done"; \cat > /tmp/file; arrow "Ok now we check your text..."; checkenlist /tmp/file'

View File

@ -11,3 +11,5 @@ alias master='goto master'
alias develop='goto develop' alias develop='goto develop'
alias gg='git config -l | grip' # search git config for ... alias gg='git config -l | grip' # search git config for ...
alias ucommit='PRE_COMMIT_ALLOW_NO_CONFIG=1 git commit --no-verify' alias ucommit='PRE_COMMIT_ALLOW_NO_CONFIG=1 git commit --no-verify'
alias gitperso='git config user.name "$GIT_PERSONAL_USER" && git config user.email "$GIT_PERSONAL_EMAIL" && success "using profile $(git whoami)"'
alias gitpro='git config user.name "$GIT_PRO_USER" && git config user.email "$GIT_PRO_EMAIL" && success "using profile $(git whoami)"'

View File

@ -319,7 +319,8 @@ function checkenlist() {
} }
function checkenremote() { function checkenremote() {
curl --location --insecure --silent "$1" > /tmp/file && checkenlist /tmp/file && write-good --no-passive /tmp/file && proselint /tmp/file && \cat /tmp/file > alex -q --stdin local target_url=$(echo "$1" | sed 's/github.com/raw.githubusercontent.com/g' | sed 's;blob/;;')
curl --location --insecure --silent "$target_url" > /tmp/file && checkenlist /tmp/file && write-good --no-passive /tmp/file && proselint /tmp/file && \cat /tmp/file > alex -q --stdin
} }
# Time management # Time management
@ -502,8 +503,10 @@ function setorigin() {
arrow "copying pre-commit hooks ..." arrow "copying pre-commit hooks ..."
if [[ "$1" =~ "$COMPANY_NAME" ]]; then if [[ "$1" =~ "$COMPANY_NAME" ]]; then
copyhooks copyhooks
gitpro
else else
copyhooks "$HOME/.git-template/.pre-commit-minimal-config.yaml" copyhooks "$HOME/.git-template/.pre-commit-minimal-config.yaml"
gitperso
fi fi
} }
function gitpushcurrentremote() { function gitpushcurrentremote() {
@ -533,8 +536,10 @@ function clone() {
arrow "copying pre-commit hooks ..." arrow "copying pre-commit hooks ..."
if [[ "$1:u" =~ "$COMPANY_NAME:u" ]]; then if [[ "$1:u" =~ "$COMPANY_NAME:u" ]]; then
copyhooks copyhooks
gitpro
else else
copyhooks "$HOME/.git-template/.pre-commit-minimal-config.yaml" copyhooks "$HOME/.git-template/.pre-commit-minimal-config.yaml"
gitperso
fi fi
else else
error "unable to change current directory to : $folder" error "unable to change current directory to : $folder"