From f5ef3b655fba159370c4794f200c468ffff6adbd Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Wed, 27 Jan 2021 12:13:13 +0100 Subject: Remove setting of $GIT_{AUTHOR,COMMITTER}_{EMAIL,NAME} These are set depending on the gitdir in .gitconfig now which is much easier to configure and less overhead than via zsh profiles. --- .zsh/zshenv/60_git | 15 ---------- .zsh/zshrc/90_profiles | 77 -------------------------------------------------- 2 files changed, 92 deletions(-) delete mode 100644 .zsh/zshenv/60_git delete mode 100644 .zsh/zshrc/90_profiles diff --git a/.zsh/zshenv/60_git b/.zsh/zshenv/60_git deleted file mode 100644 index bd9a855..0000000 --- a/.zsh/zshenv/60_git +++ /dev/null @@ -1,15 +0,0 @@ -# zshenv/60_git -# -# git environment variables -# -# Copyright © 2010-2012 Tobias Klauser -# Released under the terms of the Artistic Licence 2.0 -# -# Source repository: git://git.distanz.ch/dotfiles/zsh.git - -export GIT_AUTHOR_NAME="Tobias Klauser" -export GIT_AUTHOR_EMAIL="tklauser@distanz.ch" -export GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME" -export GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL" - -# vim:ft=zsh diff --git a/.zsh/zshrc/90_profiles b/.zsh/zshrc/90_profiles deleted file mode 100644 index 9573eef..0000000 --- a/.zsh/zshrc/90_profiles +++ /dev/null @@ -1,77 +0,0 @@ -# zshrc/90_profiles -# -# set up directory specific variables and options -# -# http://michael-prokop.at/blog/2009/05/30/directory-specific-shell-configuration-with-zsh -# -# chpwd_profiles taken from grml zshrc -# -# Copyright © 2010-2017 Tobias Klauser -# Released under the terms of the Artistic Licence 2.0 -# -# Source repository: git://git.distanz.ch/dotfiles/zsh.git - -CHPWD_PROFILE='default' - -zstyle ':chpwd:profiles:/home/tklauser/go/src/github.com/isovalent(|/|/*)' profile isovalent -zstyle ':chpwd:profiles:/home/tklauser/go/src/github.com/covalentio(|/|/*)' profile isovalent -zstyle ':chpwd:profiles:/home/tklauser/src/isovalent(|/|/*)' profile isovalent -zstyle ':chpwd:profiles:/home/tklauser/src/cilium/cilium.io(|/|/*)' profile cilium -zstyle ':chpwd:profiles:/home/tklauser/src/cilium/ebpf.io(|/|/*)' profile cilium -zstyle ':chpwd:profiles:/home/tklauser/go(|/|/*)' profile distanz -zstyle ':chpwd:profiles:/home/tklauser/src(|/|/*)' profile distanz - -chpwd_profile_distanz() -{ - [[ ${profile} == ${CHPWD_PROFILE} ]] && return 1 - print "chpwd(): Switching to profile: $profile" - - export GIT_AUTHOR_EMAIL="tklauser@distanz.ch" - export GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL" -} - -chpwd_profile_cilium() -{ - [[ ${profile} == ${CHPWD_PROFILE} ]] && return 1 - print "chpwd(): Switching to profile: $profile" - - export GIT_AUTHOR_EMAIL="tobias@cilium.io" - export GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL" -} - -chpwd_profile_isovalent() -{ - [[ ${profile} == ${CHPWD_PROFILE} ]] && return 1 - print "chpwd(): Switching to profile: $profile" - - export GIT_AUTHOR_EMAIL="tobias@isovalent.com" - export GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL" -} - -function chpwd_profiles() { - local profile context - local -i reexecute - - context=":chpwd:profiles:$PWD" - zstyle -s "$context" profile profile || profile='default' - zstyle -T "$context" re-execute && reexecute=1 || reexecute=0 - - if (( ${+parameters[CHPWD_PROFILE]} == 0 )); then - typeset -g CHPWD_PROFILE - local CHPWD_PROFILES_INIT=1 - (( ${+functions[chpwd_profiles_init]} )) && chpwd_profiles_init - elif [[ $profile != $CHPWD_PROFILE ]]; then - (( ${+functions[chpwd_leave_profile_$CHPWD_PROFILE]} )) \ - && chpwd_leave_profile_${CHPWD_PROFILE} - fi - if (( reexecute )) || [[ $profile != $CHPWD_PROFILE ]]; then - (( ${+functions[chpwd_profile_$profile]} )) && chpwd_profile_${profile} - fi - - CHPWD_PROFILE="${profile}" - return 0 -} -chpwd_functions=( ${chpwd_functions} chpwd_profiles ) - - -# vim:ft=zsh -- cgit v1.2.3-54-g00ecf