summaryrefslogtreecommitdiffstats
path: root/git-radar
diff options
context:
space:
mode:
authorMichael Allen <michael@michaelallen.io>2015-08-27 08:04:07 +0100
committerMichael Allen <michael@michaelallen.io>2015-08-27 08:04:07 +0100
commit229c96b771f23b552fdb6e9fb17faadd6ae1772d (patch)
treefdb7787d89cc9f17fbd00dc3485ed3732dc46136 /git-radar
parent878430b71536b2deec240e4a95d5e3764367e60b (diff)
parent74080c75a3c2b7c83945f326143ff219ec2302c9 (diff)
downloadgit-sonar-229c96b771f23b552fdb6e9fb17faadd6ae1772d.tar.gz
git-sonar-229c96b771f23b552fdb6e9fb17faadd6ae1772d.zip
Merge pull request #23 from bogem/fish_support
Add fish support to script's usage
Diffstat (limited to 'git-radar')
-rwxr-xr-xgit-radar16
1 files changed, 14 insertions, 2 deletions
diff --git a/git-radar b/git-radar
index f194557..664a438 100755
--- a/git-radar
+++ b/git-radar
@@ -53,11 +53,12 @@ if [[ -z $@ ]]; then
echo ""
echo "usage:"
- echo " git-radar [--zsh|--bash] [--fetch]"
+ echo " git-radar [--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"
echo " --bash # Output prompt using Bash style color characters"
+ echo " --fish # Output prompt using fish style color characters"
echo ""
echo "Bash example:"
echo " export PS1=\"\\W\\\$(git-radar --bash --fetch) \""
@@ -70,6 +71,17 @@ if [[ -z $@ ]]; then
echo " export PROMPT=\"%1/%\\\$(git-radar --zsh --fetch) \""
echo ""
echo " Same as the Bash but for Zsh."
+ echo ""
+ echo "fish example:"
+ echo " function fish_prompt"
+ echo " set_color \$fish_color_cwd"
+ echo " echo -n (prompt_pwd)"
+ echo " git-radar --fish -fetch"
+ echo " set_color normal"
+ echo " echo -n ' > '"
+ echo " end"
+ echo ""
+ echo " Same as the Bash but for fish."
exit
fi
while [[ $# > 0 ]];do
@@ -82,7 +94,7 @@ while [[ $# > 0 ]];do
if [[ "$command" == "--zsh" ]]; then
$dot/prompt.zsh
fi
- if [[ "$command" == "--bash" ]]; then
+ if [[ "$command" == "--bash" || "$command" == "--fish" ]]; then
$dot/prompt.bash
fi
done