diff options
-rw-r--r-- | Makefile | 14 | ||||
-rw-r--r-- | README.md | 40 | ||||
-rwxr-xr-x | fetch.sh | 2 | ||||
-rwxr-xr-x | git-radar | 14 | ||||
-rwxr-xr-x | prompt.bash | 2 | ||||
-rwxr-xr-x | prompt.zsh | 2 | ||||
-rwxr-xr-x | test | 2 | ||||
-rwxr-xr-x | test-branches.sh | 2 | ||||
-rwxr-xr-x | test-colors.sh | 2 | ||||
-rwxr-xr-x | test-commits.sh | 2 | ||||
-rwxr-xr-x | test-directories.sh | 2 | ||||
-rwxr-xr-x | test-files.sh | 2 | ||||
-rwxr-xr-x | test-format-config.sh | 2 | ||||
-rwxr-xr-x | test-performance.sh | 2 | ||||
-rwxr-xr-x | test-radar-base.sh | 2 | ||||
-rwxr-xr-x | test-stash.sh | 2 | ||||
-rwxr-xr-x | test-status.sh | 2 |
17 files changed, 48 insertions, 48 deletions
@@ -1,12 +1,12 @@ -SOURCES=git-radar radar-base.sh prompt.zsh prompt.bash fetch.sh +SOURCES=git-sonar sonar-base.sh prompt.zsh prompt.bash fetch.sh PREFIX=$(HOME)/.local all: - @echo 'Simple Install script for *git-radar* ' + @echo 'Simple Install script for *git-sonar* ' @echo 'For a normal installation for your user only use:' @echo ' make install' @echo '' - @echo 'If you want to install *git-radar* system wide you should change' + @echo 'If you want to install *git-sonar* system wide you should change' @echo 'the prefix' @echo '' @echo ' PREFIX=/usr/local/bin make install' @@ -19,8 +19,8 @@ all: install: $(SOURCES) @echo 'Installing in ' $(PREFIX)/bin - cp git-radar $(PREFIX)/bin - cp radar-base.sh $(PREFIX)/bin + cp git-sonar $(PREFIX)/bin + cp sonar-base.sh $(PREFIX)/bin cp prompt.zsh $(PREFIX)/bin cp prompt.bash $(PREFIX)/bin cp fetch.sh $(PREFIX)/bin @@ -28,8 +28,8 @@ install: $(SOURCES) develop: $(SOURCES) @echo 'Symlinking in ' $(PREFIX)/bin - ln -s $(PWD)/git-radar $(PREFIX)/bin/git-radar - ln -s $(PWD)/radar-base.sh $(PREFIX)/bin/radar-base.sh + ln -s $(PWD)/git-sonar $(PREFIX)/bin/git-sonar + ln -s $(PWD)/sonar-base.sh $(PREFIX)/bin/sonar-base.sh ln -s $(PWD)/prompt.zsh $(PREFIX)/bin/prompt.zsh ln -s $(PWD)/prompt.bash $(PREFIX)/bin/prompt.bash ln -s $(PWD)/fetch.sh $(PREFIX)/bin/fetch.sh @@ -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" @@ -8,6 +8,6 @@ fi dot="$(cd "$(dirname "$([ -L "$0" ] && $READLINK_CMD -f "$0" || echo "$0")")"; pwd)" -source $dot/radar-base.sh +source $dot/sonar-base.sh fetch; @@ -1,6 +1,6 @@ #! /usr/bin/env bash # -# git-radar +# git-sonar # # A heads up display for git @@ -31,7 +31,7 @@ if [[ -z $@ ]]; then _ahead_master="\xF0\x9D\x98\xAE \033[1;32m←\033[0m" _local_diverged="\033[1;33m⇵\033[0m" _stash="\033[1;33m≡\033[0m" - echo "git-radar - a heads up display for git" + echo "git-sonar - a heads up display for git" echo "" echo "examples:" printf " $_git$_master$_endgit" @@ -57,7 +57,7 @@ if [[ -z $@ ]]; then echo "" echo "usage:" - echo " git-radar [--zsh|--bash|--fish] [--fetch]" + echo " git-sonar [--zsh|--bash|--fish] [--fetch]" echo "" echo " --fetch # Fetches your repo asynchronously in the background every 5 mins" echo " --zsh # Output prompt using Zsh style color characters" @@ -65,14 +65,14 @@ if [[ -z $@ ]]; then echo " --fish # Output prompt using fish style color characters" echo "" echo "Bash example:" - echo " export PS1=\"\\W\\\$(git-radar --bash --fetch) \"" + echo " export PS1=\"\\W\\\$(git-sonar --bash --fetch) \"" echo "" - echo " This will show your current directory and the full git-radar." + echo " This will show your current directory and the full git-sonar." echo " As an added benefit, if you are in a repo, it will asynchronously" echo " run \`git fetch\` every 5 mins, so that you are never out of date." echo "" echo "Zsh example:" - echo " export PROMPT=\"%1/%\\\$(git-radar --zsh --fetch) \"" + echo " export PROMPT=\"%1/%\\\$(git-sonar --zsh --fetch) \"" echo "" echo " Same as the Bash but for Zsh." echo "" @@ -80,7 +80,7 @@ if [[ -z $@ ]]; then echo " function fish_prompt" echo " set_color \$fish_color_cwd" echo " echo -n (prompt_pwd)" - echo " git-radar --fish -fetch" + echo " git-sonar --fish -fetch" echo " set_color normal" echo " echo -n ' > '" echo " end" diff --git a/prompt.bash b/prompt.bash index 444ad7a..1709ae2 100755 --- a/prompt.bash +++ b/prompt.bash @@ -2,7 +2,7 @@ dot="$(cd "$(dirname "$0")"; pwd)" args=$@ -source "$dot/radar-base.sh" +source "$dot/sonar-base.sh" if is_repo; then prepare_bash_colors @@ -2,7 +2,7 @@ dot="$(cd "$(dirname "$0")"; pwd)" args=$@ -source "$dot/radar-base.sh" +source "$dot/sonar-base.sh" if is_repo; then autoload colors && colors @@ -1,6 +1,6 @@ #!/bin/sh -./test-radar-base.sh +./test-sonar-base.sh ./test-directories.sh ./test-commits.sh ./test-branches.sh diff --git a/test-branches.sh b/test-branches.sh index 891a819..ce779b3 100755 --- a/test-branches.sh +++ b/test-branches.sh @@ -1,7 +1,7 @@ #!/bin/bash scriptDir="$(cd "$(dirname "$0")"; pwd)" -source "$scriptDir/radar-base.sh" +source "$scriptDir/sonar-base.sh" tmpfile="" diff --git a/test-colors.sh b/test-colors.sh index f71b776..b6f6688 100755 --- a/test-colors.sh +++ b/test-colors.sh @@ -1,7 +1,7 @@ #!/bin/bash scriptDir="$(cd "$(dirname "$0")"; pwd)" -source "$scriptDir/radar-base.sh" +source "$scriptDir/sonar-base.sh" cd_to_tmp() { tmpfile="/tmp/git-prompt-tests-$(time_now)$1" diff --git a/test-commits.sh b/test-commits.sh index 7634103..4593918 100755 --- a/test-commits.sh +++ b/test-commits.sh @@ -1,7 +1,7 @@ #!/bin/bash scriptDir="$(cd "$(dirname "$0")"; pwd)" -source "$scriptDir/radar-base.sh" +source "$scriptDir/sonar-base.sh" tmpfile="" diff --git a/test-directories.sh b/test-directories.sh index 219a9f3..d440072 100755 --- a/test-directories.sh +++ b/test-directories.sh @@ -1,7 +1,7 @@ #!/bin/bash scriptDir="$(cd "$(dirname "$0")"; pwd)" -source "$scriptDir/radar-base.sh" +source "$scriptDir/sonar-base.sh" tmpfile="" diff --git a/test-files.sh b/test-files.sh index 8b06732..fff5144 100755 --- a/test-files.sh +++ b/test-files.sh @@ -1,7 +1,7 @@ #!/bin/bash scriptDir="$(cd "$(dirname "$0")"; pwd)" -source "$scriptDir/radar-base.sh" +source "$scriptDir/sonar-base.sh" tmpfile="" diff --git a/test-format-config.sh b/test-format-config.sh index 7e62c9f..b72a14a 100755 --- a/test-format-config.sh +++ b/test-format-config.sh @@ -1,7 +1,7 @@ #!/bin/bash scriptDir="$(cd "$(dirname "$0")"; pwd)" -source "$scriptDir/radar-base.sh" +source "$scriptDir/sonar-base.sh" cd_to_tmp() { tmpfile="/tmp/git-prompt-tests-$(time_now)$1" diff --git a/test-performance.sh b/test-performance.sh index 365c4a5..cb19666 100755 --- a/test-performance.sh +++ b/test-performance.sh @@ -1,6 +1,6 @@ scriptDir="$(cd "$(dirname "$0")"; pwd)" -source "$scriptDir/radar-base.sh" +source "$scriptDir/sonar-base.sh" cd_to_tmp() { tmpfile="/tmp/git-prompt-tests-$(time_now)$1" diff --git a/test-radar-base.sh b/test-radar-base.sh index ca1ddfd..7c0c742 100755 --- a/test-radar-base.sh +++ b/test-radar-base.sh @@ -1,7 +1,7 @@ #!/bin/bash scriptDir="$(cd "$(dirname "$0")"; pwd)" -source "$scriptDir/radar-base.sh" +source "$scriptDir/sonar-base.sh" test_show_remote_status() { show_remote_status diff --git a/test-stash.sh b/test-stash.sh index aecd83c..862aef1 100755 --- a/test-stash.sh +++ b/test-stash.sh @@ -1,7 +1,7 @@ #!/bin/bash scriptDir="$(cd "$(dirname "$0")"; pwd)" -source "$scriptDir/radar-base.sh" +source "$scriptDir/sonar-base.sh" tmpfile="" diff --git a/test-status.sh b/test-status.sh index 3d5dc46..56a2716 100755 --- a/test-status.sh +++ b/test-status.sh @@ -1,7 +1,7 @@ #!/bin/bash scriptDir="$(cd "$(dirname "$0")"; pwd)" -source "$scriptDir/radar-base.sh" +source "$scriptDir/sonar-base.sh" test_prefix_and_suffix() { status=""" |