From cba78096e912dd31cde8a7d959cdde1a6837b5ef Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Wed, 30 Dec 2020 14:02:03 -0600 Subject: [PATCH 1/2] Add PATH configuration for fish shell --- src/install.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/install.ts b/src/install.ts index cfc81ef..9b522a8 100644 --- a/src/install.ts +++ b/src/install.ts @@ -193,6 +193,9 @@ fi` case 'zsh': fs.writeFileSync(shellInfo.path, 'export PATH=${0:A:h}/bin:$PATH') return writeConfig('.zshrc', initContent) + case 'fish': + fs.writeFileSync(shellInfo.path, 'set -U fish_user_paths /usr/local/bin $fish_user_paths') + return writeConfig('.config/fish/config.fish', `test -f '${shellInfo.path}' && source '${shellInfo.path}'`) default: const error = `Unable to set credential helper in PATH. We don't how to set the path for ${shellInfo.shell} shell. Set the helper path in your environment PATH: ${joinBinPath()}` From e8868159d7d13052bcb46228ea6a6549a8987adf Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Wed, 30 Dec 2020 14:07:20 -0600 Subject: [PATCH 2/2] Use correct path logic --- src/install.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/install.ts b/src/install.ts index 9b522a8..16a773c 100644 --- a/src/install.ts +++ b/src/install.ts @@ -194,7 +194,7 @@ fi` fs.writeFileSync(shellInfo.path, 'export PATH=${0:A:h}/bin:$PATH') return writeConfig('.zshrc', initContent) case 'fish': - fs.writeFileSync(shellInfo.path, 'set -U fish_user_paths /usr/local/bin $fish_user_paths') + fs.writeFileSync(shellInfo.path, 'set -U fish_user_paths (dirname (status --current-filename)) $fish_user_paths') return writeConfig('.config/fish/config.fish', `test -f '${shellInfo.path}' && source '${shellInfo.path}'`) default: const error = `Unable to set credential helper in PATH. We don't how to set the path for ${shellInfo.shell} shell.