summaryrefslogtreecommitdiff
path: root/.zsh/zshrc/90_profiles
blob: dca3a5fad148167f7ce3c3b847bdc7c4c5ef3bda (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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