Skip to content

Commit

Permalink
feat: Add support for fish shell in instructions
Browse files Browse the repository at this point in the history
Add fish shell support in gitsign credential cache setup instructions.
  • Loading branch information
ananthb committed Aug 16, 2024
1 parent 512c386 commit 1fc3f6c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion cmd/gitsign-credential-cache/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
```
```

0 comments on commit 1fc3f6c

Please sign in to comment.