-
-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nix_direnv_watch_file
should be watch_file
#408
Comments
What if make |
As far as I can see, there's never a case where you'd want to Using |
@zimbatm I guess there is no other api to check if a file is beeing watched by direnv? |
@zimbatm has explicitly asked that we avoid monkey patching the direnv stdlib in this particular manner. I will continue honoring that request moving forward. However, I see no reason you couldn't do this: if has nix_direnv_watch_file; then
alias wf=nix_direnv_watch_file
else
alias wf=watch_file
fi
wf flake.nix |
The problem with any approach that doesn't just use |
This is true. At work, we've taken the approach that using or not using Yes - I agree that this is a bit frustrating. But the fact that both |
Tbh |
You can use it as a plugin. Just add this to your project:
|
Using a different name would have been also an annoyance, when a project comes with an .envrc that just uses |
If you want to make sure your environment is both automatically updated when files change, and updated to the correct value, and you don't know if the user has
nix-direnv
installed, you need to do something like this:It would be much nicer if
nix-direnv
provided its own version ofwatch_file
instead, such that a simplewatch_file file.nix
works.nix-direnv
would then also have the correct behavior by default for projects whose .envrc doesn't do anything special for nix-direnv.The text was updated successfully, but these errors were encountered: