fix #25 - oh-my-git can be disabled on a per-repository basis (idea by Olaf Alders)
This commit is contained in:
parent
630476f8ae
commit
a126690cb0
@ -90,6 +90,15 @@ which are optional, but very cool.
|
|||||||
Then, restart zsh.
|
Then, restart zsh.
|
||||||
antigen will download and install all that's needed.
|
antigen will download and install all that's needed.
|
||||||
|
|
||||||
|
# Disabling oh-my-git
|
||||||
|
oh-my-git can be disabled on a per-repository basis. Just add a
|
||||||
|
|
||||||
|
[oh-my-git]
|
||||||
|
enabled = true
|
||||||
|
|
||||||
|
in the `.git/config` file of a repo to revert to the original prompt for that particular repo. This could be handy when working with very huge repository, when the git commands invoked by oh-my-git can slow down the prompt.
|
||||||
|
|
||||||
|
|
||||||
# Known bugs and limitations
|
# Known bugs and limitations
|
||||||
|
|
||||||
* git v1.8.4 or newer is required
|
* git v1.8.4 or newer is required
|
||||||
|
6
base.sh
6
base.sh
@ -12,6 +12,12 @@ function enrich {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function build_prompt {
|
function build_prompt {
|
||||||
|
enabled=`git config --local --get oh-my-git.enabled`
|
||||||
|
if [[ ${enabled} == false ]]; then
|
||||||
|
echo "${PSORG}"
|
||||||
|
exit;
|
||||||
|
fi
|
||||||
|
|
||||||
PS1=""
|
PS1=""
|
||||||
# Git info
|
# Git info
|
||||||
current_commit_hash=$(git rev-parse HEAD 2> /dev/null)
|
current_commit_hash=$(git rev-parse HEAD 2> /dev/null)
|
||||||
|
Loading…
Reference in New Issue
Block a user