configs  Check-in [5cca8d3f29]

Overview
Comment:zshrc: Show git and fossil branch at the same time
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 5cca8d3f29c6ac9d23f515d4bec7b8dc3dbf537300d4af27edc4e845e3434bbc
User & Date: js on 2020-05-24 00:13:55
Other Links: manifest | tags
Context
2020-05-24
00:24
Pass -N to fossil diff for fsld check-in: e18743ad0f user: js tags: trunk
00:13
zshrc: Show git and fossil branch at the same time check-in: 5cca8d3f29 user: js tags: trunk
2020-05-23
23:22
fish: Add aliases for fossil check-in: 3e5396f24b user: js tags: trunk
Changes

Modified zshrc from [e7e50cbdb6] to [50db66a53c].

95
96
97
98
99
100
101

102



103
104
105
106


107
108
109
110
111
112
113
	}
fi
set_prompt

__precmd() {
	__update_terminal_cwd


	local branch=$(fossil branch current 2>/dev/null)




	if [ -z "$branch" ]; then
		branch=$(git symbolic-ref HEAD 2>/dev/null)
		branch=${branch##refs/heads/}


	fi

	set_prompt $branch
}

case $TERM in
	aterm|Eterm|rxvt*|uxterm*|xterm*)







>
|
>
>
>

|
|
|
>
>







95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
	}
fi
set_prompt

__precmd() {
	__update_terminal_cwd

	local branch=""
	local fossil_branch=$(fossil branch current 2>/dev/null)
	if [ -n "$fossil_branch" ]; then
		branch="$branch${branch:+ }f:$fossil_branch"
	fi

	
	local git_branch=$(git symbolic-ref HEAD 2>/dev/null)
	git_branch=${git_branch##refs/heads/}
	if [ -n "$git_branch" ]; then
		branch="$branch${branch:+ }g:$git_branch"
	fi

	set_prompt $branch
}

case $TERM in
	aterm|Eterm|rxvt*|uxterm*|xterm*)