Merge pull request #11349 from davidxia/fish-path

fix: use recommended way of updating Fish shell $PATH
This commit is contained in:
Mike McQuaid
2021-05-11 13:45:38 +01:00
committed by GitHub
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -98,7 +98,7 @@ describe Utils::Shell do
ENV["SHELL"] = "/usr/local/bin/fish"
ENV["fish_user_paths"] = "/some/path"
expect(described_class.prepend_path_in_profile(path))
.to eq("echo 'set -g fish_user_paths \"#{path}\" $fish_user_paths' >> #{shell_profile}")
.to eq("echo 'fish_add_path #{path}' >> #{shell_profile}")
end
end
end
+1 -1
View File
@@ -78,7 +78,7 @@ module Utils
when :csh, :tcsh
"echo 'setenv PATH #{csh_quote(path)}:$PATH' >> #{profile}"
when :fish
"echo 'set -g fish_user_paths \"#{sh_quote(path)}\" $fish_user_paths' >> #{profile}"
"echo 'fish_add_path #{sh_quote(path)}' >> #{profile}"
end
end