From 02fb756434a273fb1ac869db814e32499a2d728e Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Thu, 25 Apr 2013 23:31:11 +0100 Subject: [PATCH] Wrap long lines in readme --- README.md | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 12a6819..c986352 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,21 @@ # Git Aware Prompt -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. +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. -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. +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. I based this project mainly on Aaron Crane's [solution][1]. ## Overview -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. +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. ![Git Branch in Prompt](https://raw.github.com/jimeh/git-aware-prompt/master/preview.png) @@ -28,21 +34,28 @@ Edit your `~/.profile` or `~/.bash_profile` and add the following to the top: 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 this line: +Optionally, if you want a nice pretty prompt when using `sudo -s`, also add +this line: export SUDO_PS1="\[$bakred\]\u@\h\[$txtrst\] \w\$ " ## Configuring -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. +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. -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`. +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`. ## License -(MIT-like license, without the requirement to keep copyright notice in reproductions) +(MIT-like license, without the requirement to keep copyright notice in +reproductions) Copyright (c) 2009 Jim Myhrberg