Skip to content

Commit

Permalink
Merge pull request #23 from bogem/fish_support
Browse files Browse the repository at this point in the history
Add fish support to script's usage
  • Loading branch information
michaeldfallen committed Aug 27, 2015
2 parents 878430b + 74080c7 commit 229c96b
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions git-radar
Original file line number Diff line number Diff line change
Expand Up @@ -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) \""
Expand All @@ -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
Expand All @@ -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

0 comments on commit 229c96b

Please sign in to comment.