You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are 3 different settings that the variable fish_history can have that all essentially mean the same thing (docs)--
fish_history is unset
$fish_history = default
$fish_history = fish
It would be nice if this was a single value.
Motivation: I've been writing snippets of code frequently such as
if set -q fish_history
case default fish
set foo fish
set foo $fish_history
set foo fish
This can be worked around easily enough with an --on-variable function, such as
> function _fish_history_value --on-variable fish_history
test "$fish_history" = default && set -g fish_history fish
not set -q fish_history && set -g fish_history fish
> echo $fish_history
> set fish_history default; echo $fish_history
> set -e fish_history; echo $fish_history
> set fish_history foo; echo $fish_history
I call a function like this at the top of my config.fish. And all is fine. But others I share functions or plugins or the like with may not have this workaround, or even want it.
This seems like it should be something that is handled in the fish_history variable itself.
The text was updated successfully, but these errors were encountered:
Yeah, we should probably ditch the "default" value.
However, what I'd like to know is what you're doing with the value? I'd expect most people and programs to not care at all about $fish_history, and those that do I'd expect to just set it and be done, so if you're doing anything else that's interesting.
I think that's what I've done in the links in the previous comment. Maybe I should have phrased that last sentence differently. You may be right though, and my thinking has been backwards. Point taken. Either way, the original issue is a separate thing.