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:
Niklas Higi 2022-02-05 16:29:09 +01:00
parent 82550edf68
commit 00f209e16e
No known key found for this signature in database
GPG Key ID: C0B475782514B03F
2 changed files with 2 additions and 2 deletions

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 'fish_add_path #{path}' >> #{shell_profile}")
.to eq("fish_add_path #{path}")
end
end
end

View File

@ -78,7 +78,7 @@ module Utils
when :csh, :tcsh
"echo 'setenv PATH #{csh_quote(path)}:$PATH' >> #{profile}"
when :fish
"echo 'fish_add_path #{sh_quote(path)}' >> #{profile}"
"fish_add_path #{sh_quote(path)}"
end
end