Skip to content

Commit 1fc3f6c

Browse files
committed
feat: Add support for fish shell in instructions
Add fish shell support in gitsign credential cache setup instructions.
1 parent 512c386 commit 1fc3f6c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Diff for: cmd/gitsign-credential-cache/README.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,13 @@ if [ -f "${HOME}/.zshrc" ]; then
192192
shell_config_file="${HOME}/.zshrc"
193193
elif [ -f "${HOME}/.bashrc" ]; then
194194
shell_config_file="${HOME}/.bashrc"
195+
elif [ -f "${HOME}/.config/fish/config.fish" ]; then
196+
if [ ! -f "${HOME}/.config/fish/conf.d/gitsign-credential-cache.fish" ]; then
197+
echo "set -x GITSIGN_CREDENTIAL_CACHE \"${gitsign_cache_path}\"" > "${HOME}/.config/fish/conf.d/gitsign-credential-cache.fish"
198+
echo "Added GITSIGN_CREDENTIAL_CACHE to ${HOME}/.config/fish/conf.d/gitsign-credential-cache.fish. Please restart your shell to apply the changes."
199+
else
200+
echo "GITSIGN_CREDENTIAL_CACHE already exists in ${HOME}/.config/fish/conf.d/gitsign-credential-cache.fish!"
201+
fi
195202
else
196203
echo "No .bashrc or .zshrc found in your home directory."
197204
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
221228

222229
```sh
223230
tail -f /opt/homebrew/var/log/gitsign-credential-cache.log
224-
```
231+
```

0 commit comments

Comments
 (0)