mirror of
https://github.com/jimeh/git-aware-prompt.git
synced 2026-02-19 13:36:38 +00:00
Update code blocks, enabling syntax highlighting
This commit is contained in:
20
README.md
20
README.md
@@ -24,20 +24,26 @@ directory, your prompt works like normal.
|
|||||||
|
|
||||||
Clone the project to a `.bash` folder in your home directory:
|
Clone the project to a `.bash` folder in your home directory:
|
||||||
|
|
||||||
mkdir ~/.bash
|
```bash
|
||||||
cd ~/.bash
|
mkdir ~/.bash
|
||||||
git clone git://github.com/jimeh/git-aware-prompt.git
|
cd ~/.bash
|
||||||
|
git clone git://github.com/jimeh/git-aware-prompt.git
|
||||||
|
```
|
||||||
|
|
||||||
Edit your `~/.profile` or `~/.bash_profile` and add the following to the top:
|
Edit your `~/.profile` or `~/.bash_profile` and add the following to the top:
|
||||||
|
|
||||||
export GITAWAREPROMPT=~/.bash/git-aware-prompt
|
```bash
|
||||||
source $GITAWAREPROMPT/main.sh
|
export GITAWAREPROMPT=~/.bash/git-aware-prompt
|
||||||
export PS1="\u@\h \w \[$txtcyn\]\$git_branch\[$txtred\]\$git_dirty\[$txtrst\]\$ "
|
source $GITAWAREPROMPT/main.sh
|
||||||
|
export PS1="\u@\h \w \[$txtcyn\]\$git_branch\[$txtred\]\$git_dirty\[$txtrst\]\$ "
|
||||||
|
```
|
||||||
|
|
||||||
Optionally, if you want a nice pretty prompt when using `sudo -s`, also add
|
Optionally, if you want a nice pretty prompt when using `sudo -s`, also add
|
||||||
this line:
|
this line:
|
||||||
|
|
||||||
export SUDO_PS1="\[$bakred\]\u@\h\[$txtrst\] \w\$ "
|
```bash
|
||||||
|
export SUDO_PS1="\[$bakred\]\u@\h\[$txtrst\] \w\$ "
|
||||||
|
```
|
||||||
|
|
||||||
The new prompt will take effect beginning in your next session. This usually
|
The new prompt will take effect beginning in your next session. This usually
|
||||||
means logging out completely. To enable it in your current session, you can
|
means logging out completely. To enable it in your current session, you can
|
||||||
|
|||||||
Reference in New Issue
Block a user