From bd7c9eafd754eb5b4ea322c482e126449eed44c2 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Mon, 7 Mar 2011 15:57:05 +0100 Subject: add profiles configuration --- .zsh/zshrc/90_profiles | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .zsh/zshrc/90_profiles diff --git a/.zsh/zshrc/90_profiles b/.zsh/zshrc/90_profiles new file mode 100644 index 0000000..dca3a5f --- /dev/null +++ b/.zsh/zshrc/90_profiles @@ -0,0 +1,52 @@ +# zshrc/90_profiles +# +# set up directory specific variables and options +# +# http://michael-prokop.at/blog/2009/05/30/directory-specific-shell-configuration-with-zsh +# +# Copyright © 2010 Tobias Klauser +# Released under the terms of the Artistic Licence 2.0 +# +# Source repository: git://git.distanz.ch/dotfiles/zsh.git + +zstyle ':chpwd:profiles:/home/tklauser/src/nios2-linux(|/|/*)' profile nios2linux +zstyle ':chpwd:profiles:/home/tklauser/projects/sinet(|/|/*)' profile sinet +zstyle ':chpwd:profiles:/home/tklauser/src/linux-2.6(|/|/*)' profile linux26 + +chpwd_profile_nios2linux() +{ + [[ ${profile} == ${CHPWD_PROFILE} ]] && return 1 + print "chpwd(): Switching to profile: $profile" + + export GIT_AUTHOR_EMAIL="klto@zhaw.ch" + export GIT_COMMITTER_EMAIL="klto@zhaw.ch" +} + +chpwd_profile_sinet() +{ + [[ ${profile} == ${CHPWD_PROFILE} ]] && return 1 + print "chpwd(): Switching to profile: $profile" + + export GIT_AUTHOR_EMAIL="klto@zhaw.ch" + export GIT_COMMITTER_EMAIL="klto@zhaw.ch" +} + +chpwd_profile_hdoip() +{ + [[ ${profile} == ${CHPWD_PROFILE} ]] && return 1 + print "chpwd(): Switching to profile: $profile" + + export GIT_AUTHOR_EMAIL="klto@zhaw.ch" + export GIT_COMMITTER_EMAIL="klto@zhaw.ch" +} + +chpwd_profile_linux26() +{ + [[ ${profile} == ${CHPWD_PROFILE} ]] && return 1 + print "chpwd(): Switching to profile: $profile" + + export GIT_AUTHOR_EMAIL="tklauser@distanz.ch" + export GIT_COMMITTER_EMAIL="tklauser@distanz.ch" +} + +# vim:ft=zsh -- cgit v1.2.3-54-g00ecf