Skip to content

Commit 02fb756

Browse files
committed
Wrap long lines in readme
1 parent a83ef26 commit 02fb756

File tree

1 file changed

+20
-7
lines changed

1 file changed

+20
-7
lines changed

README.md

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
11
# Git Aware Prompt
22

3-
Working with Git and its great branching/merging features is amazing. Constantly switching branches can be confusing though as you have to run `git status` to see which branch you're currently on.
3+
Working with Git and its great branching/merging features is
4+
amazing. Constantly switching branches can be confusing though as you have to
5+
run `git status` to see which branch you're currently on.
46

5-
The solution to this is to have your terminal prompt display the current branch. There's a [number][1] [of][2] [articles][3] [available][4] online about how to achieve this.
7+
The solution to this is to have your terminal prompt display the current
8+
branch. There's a [number][1] [of][2] [articles][3] [available][4] online
9+
about how to achieve this.
610

711
I based this project mainly on Aaron Crane's [solution][1].
812

913

1014
## Overview
1115

12-
If you `cd` to a Git working directory, you will see the current Git branch name displayed in your terminal prompt. When you're not in a Git working directory, your prompt works like normal.
16+
If you `cd` to a Git working directory, you will see the current Git branch
17+
name displayed in your terminal prompt. When you're not in a Git working
18+
directory, your prompt works like normal.
1319

1420
![Git Branch in Prompt](https://raw.github.com/jimeh/git-aware-prompt/master/preview.png)
1521

@@ -28,21 +34,28 @@ Edit your `~/.profile` or `~/.bash_profile` and add the following to the top:
2834
source $GITAWAREPROMPT/main.sh
2935
export PS1="\u@\h \w \[$txtcyn\]\$git_branch\[$txtred\]\$git_dirty\[$txtrst\]\$ "
3036

31-
Optionally, if you want a nice pretty prompt when using `sudo -s`, also add this line:
37+
Optionally, if you want a nice pretty prompt when using `sudo -s`, also add
38+
this line:
3239

3340
export SUDO_PS1="\[$bakred\]\u@\h\[$txtrst\] \w\$ "
3441

3542

3643
## Configuring
3744

38-
If you followed the above installation instructions, you've added the default prompt style already by defining the `PS1` variable. If you don't know how to customize your prompt, I recommend you check [this][5] how-to.
45+
If you followed the above installation instructions, you've added the default
46+
prompt style already by defining the `PS1` variable. If you don't know how to
47+
customize your prompt, I recommend you check [this][5] how-to.
3948

40-
Basically, to have the current Git branch shown, simply add `$git_branch` to your `PS1` variable, and make sure the variable value is defined with double quotes. A set of color variables have also been set for you to use. For a list of available colors check `colors.sh`.
49+
Basically, to have the current Git branch shown, simply add `$git_branch` to
50+
your `PS1` variable, and make sure the variable value is defined with double
51+
quotes. A set of color variables have also been set for you to use. For a list
52+
of available colors check `colors.sh`.
4153

4254

4355
## License
4456

45-
(MIT-like license, without the requirement to keep copyright notice in reproductions)
57+
(MIT-like license, without the requirement to keep copyright notice in
58+
reproductions)
4659

4760
Copyright (c) 2009 Jim Myhrberg
4861

0 commit comments

Comments
 (0)