Skip to content

Commit

Permalink
readme test
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewRayCode committed Aug 27, 2011
1 parent 0bc7444 commit e2ee8cd
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,18 @@ Bash Prompt Builder
This is a website hosting a configurable function to modify your bash prompt to include DVCS information. Currently supported are Git, Mercurial (hg) and Subversion.

## Modifying the function:
The entire function is stored in [index.html](https://github.com/DelvarWorld/Bash-Prompt-Builder/blob/master/index.html). If you wish to modify the function please do so in that file. Here is the tricky part. The function is stored in a giant string assigned to the variable dvcs_function. This variable is then executed in the PS1 output. If you wish to add any functionality you need to follow certain rules:
The entire function is stored in [index.html](https://github.com/DelvarWorld/Bash-Prompt-Builder/blob/master/index.html). If you wish to modify the function please do so in that file. Here is the tricky part. The function is stored in a giant string assigned to the variable dvcs_function. This variable is then executed in the PS1 output.

If you wish to add any functionality you need to follow certain rules:

- All quotes must be escaped, so `if [[ "$gitBranch" != "" ]]; then` becomes `if [[ \"\$gitBranch\" != \"\" ]]; then`
- Variables must be escaped with `\` before the `$` such as \"\$gitBranch\"
- Color codes must be escaped as `\"\\[\$COLOR_YELLOW\\]\"`

To make the function configurable, there is a simple comment notation in place. To mark a section of code, follow these rules:
# :start-label
... code indented by 4 spaces ...
# /end-label

## Modifying the website:

Expand Down

0 comments on commit e2ee8cd

Please sign in to comment.