From 1fc3f6c5ceb0320ea6cb45d1398de303cb03ad2c Mon Sep 17 00:00:00 2001 From: Ananth Bhaskararaman Date: Fri, 16 Aug 2024 16:34:26 +0530 Subject: [PATCH] feat: Add support for fish shell in instructions Add fish shell support in gitsign credential cache setup instructions. --- cmd/gitsign-credential-cache/README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/cmd/gitsign-credential-cache/README.md b/cmd/gitsign-credential-cache/README.md index eb47132c..dc5d6b32 100644 --- a/cmd/gitsign-credential-cache/README.md +++ b/cmd/gitsign-credential-cache/README.md @@ -192,6 +192,13 @@ if [ -f "${HOME}/.zshrc" ]; then shell_config_file="${HOME}/.zshrc" elif [ -f "${HOME}/.bashrc" ]; then shell_config_file="${HOME}/.bashrc" +elif [ -f "${HOME}/.config/fish/config.fish" ]; then + if [ ! -f "${HOME}/.config/fish/conf.d/gitsign-credential-cache.fish" ]; then + echo "set -x GITSIGN_CREDENTIAL_CACHE \"${gitsign_cache_path}\"" > "${HOME}/.config/fish/conf.d/gitsign-credential-cache.fish" + echo "Added GITSIGN_CREDENTIAL_CACHE to ${HOME}/.config/fish/conf.d/gitsign-credential-cache.fish. Please restart your shell to apply the changes." + else + echo "GITSIGN_CREDENTIAL_CACHE already exists in ${HOME}/.config/fish/conf.d/gitsign-credential-cache.fish!" + fi else echo "No .bashrc or .zshrc found in your home directory." exit 1 @@ -221,4 +228,4 @@ and of course if you would like to tail the logs of your service you can do so b ```sh tail -f /opt/homebrew/var/log/gitsign-credential-cache.log -``` \ No newline at end of file +```