Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
set_color to be a built-in #578
Here's why I want
set_color is too complicated to be a function. This means it has to be an executable, and we run into the "relocatable fish" problem of how do we update PATH? We can address this in other cases with a function-wrapper that looks it up in
There's also a number of places in fish where we call set_color and cache the output and then try to determine when to invalidate the cache. If it were just a builtin, we could drop all of that. This also means that our prompts will fork less.
So keeping it as a separate executable incurs a moderate complexity and performance price, and makes it harder to achieve the goal of no longer needing to modify PATH.