jorgebucaran / hydro

Ultra-pure, lag-free prompt with async Git status—just for Fish
MIT License
637 stars 53 forks source link

Avoid pulling in pre-existing $out env var #31

Closed dnadlinger closed 2 years ago

dnadlinger commented 2 years ago

Nix tends to set $out in various circumstances, which shouldn't leak into the prompt line.

jorgebucaran commented 2 years ago

Could we change our variable name instead?

dnadlinger commented 2 years ago

set --localing the variable to be empty before --local --appending to it seems to be the correct fix either way, whatever the name. I'm not a fish expert, but it seems like what the code is currently doing with --local is perfectly appropriate, except for the first set --local --append pulling in a non---local value. Conversely, once it's properly local, there is probably no reason to use a more cumbersome name.

jorgebucaran commented 2 years ago

Another option is to declare out as an argument to the function so it will be empty from the start.

jorgebucaran commented 2 years ago

Thank you, @dnadlinger! Just got around to merging here. 💯