From d004afc1a8f993ad991168184da28e8fc6178e5e Mon Sep 17 00:00:00 2001 From: jdiamond Date: Tue, 2 May 2017 13:20:56 -0700 Subject: [PATCH 1/2] 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 From 437414386dcd3a87ba0a4fe5dbca229264a588f8 Mon Sep 17 00:00:00 2001 From: jdiamond Date: Tue, 2 May 2017 13:30:44 -0700 Subject: [PATCH 2/2] Added direct cp method --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6c34a6e..c90388d 100644 --- a/README.md +++ b/README.md @@ -122,7 +122,7 @@ Add to the `~/.bashrc`: - 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 +- To install as an option in the fish_config GUI ```sh sudo install -m 666 gitprompt.fish /usr/share/fish/tools/web_config/sample_prompts/ @@ -131,6 +131,14 @@ 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 +- You can also do + +```sh +mkdir -p ~/.config/fish/functions/ +cp gitprompt.fish ~/.config/fish/functions/fish_prompt.fish +``` + to overwrite the current prompt with the bash-git-prompt directly + ### All configs for .bashrc