diff options
author | Malfurious <m@lfurio.us> | 2021-08-24 05:50:47 -0400 |
---|---|---|
committer | Malfurious <m@lfurio.us> | 2021-08-24 05:50:47 -0400 |
commit | 2276cb2163ff137b4d323cd8f63ec7af89f5784d (patch) | |
tree | 1e10e4fbe077c5ea969d4757f0708c857f4dfaf5 /README.md | |
parent | d7f8bee3f06566847036c561c1cdf2b05ebafc5a (diff) | |
download | git-sonar-2276cb2163ff137b4d323cd8f63ec7af89f5784d.tar.gz git-sonar-2276cb2163ff137b4d323cd8f63ec7af89f5784d.zip |
Update README for new release
Signed-off-by: Malfurious <m@lfurio.us>
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 92 |
1 files changed, 18 insertions, 74 deletions
@@ -24,8 +24,7 @@ last few years. Maybe it can help you too. - [Configuring colours](#configuring-colours) - [Exporting Environment Variables](#exporting-environment-variables) - [Setting an RC file](#setting-an-rc-file) - - [Bash Colour Codes](#bash-colour-codes) - - [Zsh Colour Codes](#zsh-colour-codes) + - [Colour Codes](#colour-codes) - [Configuration values](#configuration-values) - [Colouring the Branch part](#colouring-the-branch-part) - [Colouring the local commits status](#colouring-the-local-commits-status) @@ -36,20 +35,9 @@ last few years. Maybe it can help you too. ## Installation -### Install from brew: - -``` -> brew install michaeldfallen/formula/git-radar -``` - -### Manually: - -``` -> cd ~ && git clone https://github.com/michaeldfallen/git-radar .git-radar -> echo 'export PATH=$PATH:$HOME/.git-radar' >> ~/.bashrc -``` - -Then run `git-radar` to see the docs and prove it's installed. +For a normal installation, run 'make install' (may require sudo), but see the +output from 'make' for more installation options. Run 'git-sonar -h' to confirm +the install is successful. ## Usage @@ -60,7 +48,7 @@ ways depending on your shell. Add to your `.bashrc` ```bash -export PS1="$PS1\$(git-sonar --bash --fetch)" +export PS1="$PS1\$(git-sonar --bash) " ``` [(note: the `\` escaping the `$` is important)](#ensuring-prompt-execution) @@ -68,7 +56,7 @@ export PS1="$PS1\$(git-sonar --bash --fetch)" Add to your `.zshrc` ```zsh -export PROMPT="$PROMPT\$(git-sonar --zsh --fetch) " +export PROMPT="$PROMPT\$(git-sonar --zsh) " ``` [(note: the `\` escaping the `$` is important)](#ensuring-prompt-execution) @@ -79,7 +67,7 @@ Add to your `config.fish` function fish_prompt set_color $fish_color_cwd echo -n (prompt_pwd) - echo -n (git-sonar --fish --fetch) + echo -n (git-sonar --fish) set_color normal echo -n ' > ' end @@ -144,8 +132,7 @@ See [Customise your prompt](#customise-your-prompt) for how to personalise this. ### Remote commits status The prompt will also show the difference between your branch on origin and what -is on `origin/master`. This a is hard coded branch name which I intend to make -configurable in the future. +is on `origin/master`. This is the difference between the commits you've pushed up and `origin/master`. @@ -159,7 +146,7 @@ The use of feature is controlled by the `GIT_RADAR_FORMAT` environment variable. See [Customise your prompt](#customise-your-prompt) for how to personalise this. ### Stash status -The prompt will show you whether and how many stashes you have stored. +The prompt will show you how many stashes you have stored. Prompt | Meaning ---------------------------|--------------- @@ -170,7 +157,7 @@ If you don't rely on this status, you can always hide this part of the prompt by ### (Optional) Auto-fetch repos -Ensuring your refs are up to date I found can be a pain. To streamline this +Ensuring your refs are up to date I found can be a pain. To streamline this, git-sonar can be configured to auto-fetch your repo. When the `--fetch` flag is used git-sonar will run `git fetch` asynchronously every 5 minutes. @@ -230,7 +217,7 @@ of the corresponding feature. **Examples** -GIT_RADAR_FORMAT | Result +GIT\_RADAR\_FORMAT | Result --------------------------------------|--------------------- `%{branch}%{local}%{changes}` | `master1↑1M` `[%{branch}] - %{local} - %{changes}` | `[master] - 1↑ - 1M` @@ -241,7 +228,7 @@ Often you will want certain parts of the prompt to only appear when there is content to render. For example, when in a repo you want `[branch]` but when out of a repo you don't want the `[]` appearing. -To do this the control strings support prefixes and suffixes. Prefixes and +To do this, the control strings support prefixes and suffixes. Prefixes and Suffixes are separated from the feature name by `:` and will only render if the feature would render: @@ -314,26 +301,14 @@ In `~/.gitradarrc`: GIT_RADAR_COLOR_BRANCH='$fg[yellow]' ``` -**Basic RC file** - Create a file at `~/.gitradarrc` which sets the Environment variables listed in [Configuration values](#configuration-values) using colour codes listed in -either [Zsh Colour Codes](#zsh-colour-codes) or -[Bash Colour Codes](#Bash-Colour-Codes) depending on your shell. - -**Shell specific RC file** +[Colour Codes](#Colour-Codes). -If you use both Bash and Zsh you can set RC files that are specific for those -shells. -For Bash: Create a file at `~/.gitradarrc.bash` +#### Colour Codes -For Zsh: Create a file at `~/.gitradarrc.zsh` - - -#### Bash Colour Codes - -Bash colour codes make use of the colours your terminal app claims to be `red` +Colour codes make use of the colours your terminal app claims to be `red` or `green`. Using one of these codes will only produce the colour your terminal claims, so you should customise your colour scheme on your terminal as well as customising git-sonar. @@ -366,41 +341,10 @@ Reset | `\\033[0m` | `\\033[0m` Note the Reset will set back to what your terminal claims as standard text and background. -#### Zsh Colour Codes - -Zsh also provides a way to access the colours that your terminal claims as `red` -or `green`, etc. - -Note the "Bright" colours can be shown as bold instead, it depends on your -terminal. By default, for example, the Mac OSX Terminal.app uses the "Bright" -colours to provide 8 new lighter colours but some terminals only support 8 and -will show the text as bold instead. - -Colour | Code for Text | Code for Background ---------------|--------------------|-------------------- -Black | `$fg[black]` | `$bg[black]` -Red | `$fg[red]` | `$bg[red]` -Green | `$fg[green]` | `$bg[green]` -Yellow | `$fg[yellow]` | `$bg[yellow]` -Blue | `$fg[blue]` | `$bg[blue]` -Magenta | `$fg[magenta]` | `$bg[magenta]` -Cyan | `$fg[cyan]` | `$bg[cyan]` -White | `$fg[white]` | `$bg[white]` -Bright Black | `$fg_bold[black]` | `$bg_bold[black]` -Bright Red | `$fg_bold[red]` | `$bg_bold[red]` -Bright Green | `$fg_bold[green]` | `$bg_bold[green]` -Bright Yellow | `$fg_bold[yellow]` | `$bg_bold[yellow]` -Bright Blue | `$fg_bold[blue]` | `$bg_bold[blue]` -Bright Magenta| `$fg_bold[magenta]`| `$bg_bold[magenta]` -Bright Cyan | `$fg_bold[cyan]` | `$bg_bold[cyan]` -Bright White | `$fg_bold[white]` | `$bg_bold[white]` -Reset | `$reset_color` | `$reset_color` - #### Configuration values -All these values should be set using a the correct colour code for your -terminal. You should also choose the colour code based on what shell you are -using. There is a way to support [colouring multiple shells using rc files](#setting-an-rc-file). +All these values should be set using the correct colour code for your +terminal. ##### Colouring the Branch part @@ -554,7 +498,7 @@ a different background colour to return to. ## License -Git Radar is licensed under the MIT license. +Git Radar and Git Sonar are licensed under the MIT license. See [LICENSE] for the full license text. |