From d004afc1a8f993ad991168184da28e8fc6178e5e Mon Sep 17 00:00:00 2001 From: jdiamond Date: Tue, 2 May 2017 13:20:56 -0700 Subject: [PATCH] Added instructions for using with fish_config --- README.md | 15 +++++++++++++++ gitprompt.fish | 3 +++ 2 files changed, 18 insertions(+) diff --git a/README.md b/README.md index 3517631..6c34a6e 100644 --- a/README.md +++ b/README.md @@ -117,6 +117,21 @@ Add to the `~/.bashrc`: source ~/.bash-git-prompt/gitprompt.sh ``` +### install for the fish shell + +- If you cloned the repo to a directory other then ~/.bash-git-prompt , set __GIT_PROMPT_DIR in ~/.config/fish/config.fish + to that path + +- Run + +```sh +sudo install -m 666 gitprompt.fish /usr/share/fish/tools/web_config/sample_prompts/ +fish_config +``` + to install the bash-git-prompt as a choice under the prompt tab of the web config. Selecting this will copy it to + ~/.config/fish/functions/fish_prompt.fish + + ### All configs for .bashrc ```sh diff --git a/gitprompt.fish b/gitprompt.fish index 26e346b..2a32a0e 100644 --- a/gitprompt.fish +++ b/gitprompt.fish @@ -1,3 +1,6 @@ +# name: bash-git-prompt +# author: Mariusz Smykuła + if not set -q __GIT_PROMPT_DIR set __GIT_PROMPT_DIR ~/.gitprompt end