You've already forked bash-git-prompt
added info
This commit is contained in:
44
README.md
44
README.md
@@ -219,6 +219,20 @@ The Git prompt behavior will continue to work normally.
|
||||
|
||||
---
|
||||
|
||||
### FAQ
|
||||
|
||||
**Q:** Does this replace my default prompt entirely?
|
||||
**A:** While loaded, the script manages PS1 so it can switch automatically between Git and non-Git directories. Outside repositories a simplified prompt is shown; inside repositories the Git-aware prompt is shown.
|
||||
|
||||
**Q:** Can I create my own theme?
|
||||
**A:** Absolutely. Each theme is defined in the script under `set_git_prompt_theme_icons()`.
|
||||
You can modify or extend it, then set your new theme using `export GIT_PROMPT_THEME=<number>`.
|
||||
|
||||
**Q:** Does it slow down Git-heavy directories?
|
||||
**A:** Negligibly. The script uses optimized Git calls and caches status checks for performance.
|
||||
|
||||
---
|
||||
|
||||
### Troubleshooting
|
||||
|
||||
**Symbols not showing correctly:**
|
||||
@@ -237,19 +251,31 @@ fi
|
||||
# Git Prompt Stop
|
||||
```
|
||||
|
||||
---
|
||||
**I changed my root prompt in the script but it’s not working:**
|
||||
This is most likely because the bash-git-prompt is not loaded for the root account.
|
||||
|
||||
### FAQ
|
||||
The script only affects the user whose `.bashrc` loads it.
|
||||
If you switch to root using `sudo`, root uses `/root/.bashrc`, which normally does not load the bash-git-prompt.
|
||||
|
||||
**Q:** Does this replace my default prompt entirely?
|
||||
**A:** While loaded, the script manages PS1 so it can switch automatically between Git and non-Git directories. Outside repositories a simplified prompt is shown; inside repositories the Git-aware prompt is shown.
|
||||
To use the Git prompt as root, you must either:
|
||||
|
||||
**Q:** Can I create my own theme?
|
||||
**A:** Absolutely. Each theme is defined in the script under `set_git_prompt_theme_icons()`.
|
||||
You can modify or extend it, then set your new theme using `export GIT_PROMPT_THEME=<number>`.
|
||||
1. Clone the repository into root’s home directory and load it from `/root/.bashrc`, or
|
||||
2. Load the script from its existing location by using the full path in `/root/.bashrc`, or
|
||||
3. Create a symbolic link in root’s home directory pointing to the existing installation.
|
||||
|
||||
**Q:** Does it slow down Git-heavy directories?
|
||||
**A:** Negligibly. The script uses optimized Git calls and caches status checks for performance.
|
||||
Example using a full path:
|
||||
|
||||
```
|
||||
source /home/<username>/.bash-git-prompt/bash-git-prompt
|
||||
```
|
||||
|
||||
Example using a symbolic link:
|
||||
|
||||
```
|
||||
ln -s /home/<username>/.bash-git-prompt /root/.bash-git-prompt
|
||||
```
|
||||
|
||||
Make sure the root user has read access to that path.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user