Repository navigation
Conversation
|
Looks like the failing test is also failing on latest master |
agammann
left a comment
There was a problem hiding this comment.
[P2] Resolve a relative FISH_CONFIG_DIR once against the startup working directory. The new override stores ./my-fish verbatim in the static config path. Startup can source ./my-fish/config.fish, but after cd /tmp, __fish_config_dir and the function/completion paths built from it now point at /tmp/my-fish instead. That silently changes which config files are read and can autoload a different function from the new directory. The documented override does not require an absolute path, so normalize relative values before caching them and add a cd regression test.
|
We've previously decided against this (see #3030), although the idea of a "hermetic portable fish" is interesting. I'm inclined not to merge this because of the additional complexity in interface though. |
|
@zanchey I should've looked to see if there had been prior art, apologies! I can understand the desire not to add complexity to the interface, but the original decision made in #3030 was based on someone wanting to place their fish config in a different directory. That can be handled, as people mention, by either deciding not to, using a symlink, or changing XDG_CONFIG_DIR. I would love to see this supported upstream, as I don't want to rebase this patch every time I want to upgrade fish, but I will if it's not wanted by the project, but hopefully you will reconsider! @agammann I will make the change you suggest and try to figure out how to make a test for this |
ea90996 to
a3d637c
Compare
|
I've made the path absolute and added a test that verifies the behaviour of this feature in general 🎉 |
c2d6684 to
0b71585
Compare
0b71585 to
546cf1d
Compare
This adds an environment variable that allows the user to specify the fish config directory.
This is primarily aimed at usage with nix, as it will allow making a fully hermetic fish installation that includes the configuration inside it. See example flake.nix:
Details
The config would be in the same directory as the flake.nix (Note: This assumes that this commit is merged and updated in nixpkgs)But I believe that this will also be useful for people wanting to try out someone else's configs more easily (just download it and set CONFIG_FISH_DIR, without affecting your actual installed config in any way)
TODOs:
Not sure how to add a test for this to be perfectly honest, so guidance for that would be very helpful!