diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2011-03-07 15:57:05 +0100 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2011-03-07 15:57:05 +0100 |
commit | bd7c9eafd754eb5b4ea322c482e126449eed44c2 (patch) | |
tree | 4773ce2c73fdbd29e7c0c59377bdd037e8f46cd2 /.zsh/zshrc/90_profiles | |
parent | 6438b8fea2cc7407e95f134df7b2f210522bc810 (diff) |
add profiles configuration
Diffstat (limited to '.zsh/zshrc/90_profiles')
-rw-r--r-- | .zsh/zshrc/90_profiles | 52 |
1 files changed, 52 insertions, 0 deletions
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 <tklauser@distanz.ch> +# 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 |