@ -266,6 +266,13 @@ GIT_PROMPT_COMMAND_FAIL="${Red}✘-_LAST_COMMAND_STATE_ " # displays as ✘-1 fo
git_prompt_reset
```
- You can disable/enable gitprompt by runnning:
```sh
git_prompt_toggle
**Enjoy!**
## Alternative RPM Install
@ -331,7 +331,7 @@ function setGitPrompt() {
git_prompt_config
if [[ ! -e "$repo" ]]; then
if [[ ! -e "$repo" ]] || [[ "$GIT_PROMPT_DISABLE" = 1 ]]; then
PS1="$EMPTY_PROMPT"
return
fi
@ -570,6 +570,16 @@ function prompt_callback_default {
}
# toggle gitprompt
function git_prompt_toggle() {
if [[ "$GIT_PROMPT_DISABLE" = 1 ]]; then
GIT_PROMPT_DISABLE=0
else
GIT_PROMPT_DISABLE=1
function gp_install_prompt {
if [ -z "$OLD_GITPROMPT" ]; then
OLD_GITPROMPT=$PS1