diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 40 |
1 files changed, 20 insertions, 20 deletions
@@ -1,10 +1,10 @@ -# Git Radar +# Git Sonar -A heads up display for git. +A heads up display for git. Fork of 'git-radar' by Michael Allen (https://github.com/michaeldfallen/git-radar). -![An example of git-radar] +![An example of git-sonar] -Git-radar is a tool you can add to your prompt to provide at-a-glance +Git-sonar is a tool you can add to your prompt to provide at-a-glance information on your git repo. It's a labour of love I've been dogfooding for the last few years. Maybe it can help you too. @@ -53,14 +53,14 @@ Then run `git-radar` to see the docs and prove it's installed. ## Usage -To use git-radar you need to add it to your prompt. This is done in different +To use git-sonar you need to add it to your prompt. This is done in different ways depending on your shell. **Bash** Add to your `.bashrc` ```bash -export PS1="$PS1\$(git-radar --bash --fetch)" +export PS1="$PS1\$(git-sonar --bash --fetch)" ``` [(note: the `\` escaping the `$` is important)](#ensuring-prompt-execution) @@ -68,7 +68,7 @@ export PS1="$PS1\$(git-radar --bash --fetch)" Add to your `.zshrc` ```zsh -export PROMPT="$PROMPT\$(git-radar --zsh --fetch) " +export PROMPT="$PROMPT\$(git-sonar --zsh --fetch) " ``` [(note: the `\` escaping the `$` is important)](#ensuring-prompt-execution) @@ -79,7 +79,7 @@ Add to your `config.fish` function fish_prompt set_color $fish_color_cwd echo -n (prompt_pwd) - echo -n (git-radar --fish --fetch) + echo -n (git-sonar --fish --fetch) set_color normal echo -n ' > ' end @@ -171,23 +171,23 @@ 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 -git-radar can be configured to auto-fetch your repo. When the `--fetch` flag is -used git-radar will run `git fetch` asynchronously every 5 minutes. +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. This will only occur when the prompt is rendered and it will only occur on the repo you are currently in. -To use this feature, when setting your prompt, call git-radar with `--fetch`: +To use this feature, when setting your prompt, call git-sonar with `--fetch`: **Bash** ```bash -export PS1="$PS1\$(git-radar --bash --fetch)" +export PS1="$PS1\$(git-sonar --bash --fetch)" ``` [(note: the `\` escaping the `$` is important)](#ensuring-prompt-execution) **Zsh** ```zsh -export PROMPT="$PROMPT\$(git-radar --zsh --fetch) " +export PROMPT="$PROMPT\$(git-sonar --zsh --fetch) " ``` [(note: the `\` escaping the `$` is important)](#ensuring-prompt-execution) @@ -212,7 +212,7 @@ GIT_RADAR_FETCH_TIME=30 ## Customise your prompt -Git Radar is highly customisable using a prompt format string. The 4 features +Git Sonar is highly customisable using a prompt format string. The 4 features above: remote commits, local commits, branch and file changes; are controlled by the prompt format string. @@ -267,14 +267,14 @@ to escape the execution of the function. There are two ways to do this: **1. Use `$'` to render raw characters** ```bash -export PROMPT=$'$(git-radar --zsh)' -export PS1=$'$(git-radar --bash)' +export PROMPT=$'$(git-sonar --zsh)' +export PS1=$'$(git-sonar --bash)' ``` **2. Use `\` to escape execution of the subshell** ```bash -export PROMPT="\$(git-radar --zsh)" -export PS1="\$(git-radar --bash)" +export PROMPT="\$(git-sonar --zsh)" +export PS1="\$(git-sonar --bash)" ``` ### Configuring colours @@ -304,7 +304,7 @@ export GIT_RADAR_COLOR_BRANCH='\\033[0;33m' #### Setting an RC file -Git radar supports multiple rc files. One of these will be sourced when the +Git sonar supports multiple rc files. One of these will be sourced when the prompt renders. **Example: Change the branch colour in Zsh** @@ -336,7 +336,7 @@ For Zsh: Create a file at `~/.gitradarrc.zsh` Bash 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-radar. +customising git-sonar. 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" |