mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Recommend interactive usage of fish_add_path
Since the `fish_add_path` command modifies a universal Fish variable (which is automatically persisted to a file) it's unnecessary to run it again every time a new shell is opened.
This commit is contained in:
parent
82550edf68
commit
00f209e16e
@ -98,7 +98,7 @@ describe Utils::Shell do
|
|||||||
ENV["SHELL"] = "/usr/local/bin/fish"
|
ENV["SHELL"] = "/usr/local/bin/fish"
|
||||||
ENV["fish_user_paths"] = "/some/path"
|
ENV["fish_user_paths"] = "/some/path"
|
||||||
expect(described_class.prepend_path_in_profile(path))
|
expect(described_class.prepend_path_in_profile(path))
|
||||||
.to eq("echo 'fish_add_path #{path}' >> #{shell_profile}")
|
.to eq("fish_add_path #{path}")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -78,7 +78,7 @@ module Utils
|
|||||||
when :csh, :tcsh
|
when :csh, :tcsh
|
||||||
"echo 'setenv PATH #{csh_quote(path)}:$PATH' >> #{profile}"
|
"echo 'setenv PATH #{csh_quote(path)}:$PATH' >> #{profile}"
|
||||||
when :fish
|
when :fish
|
||||||
"echo 'fish_add_path #{sh_quote(path)}' >> #{profile}"
|
"fish_add_path #{sh_quote(path)}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user