-
Notifications
You must be signed in to change notification settings - Fork 2k
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
add a set --show
flag
#4265
Comments
I am strongly inclined to include the fix for this in fish 2.7.0 despite the fact I have recently argued that other changes be deferred to 3.0.0. In this case the implementation is borderline trivial and no existing behavior is altered. If the user doesn't use the new |
Sigh! I'm not going to merge this into |
This adds a new capability to the `set` command. It is similar to running `set` with no other arguments but provides far more detail about each variable. Such as whether it is set in each of the local, global, and universal scopes. And the values in each scope. You can also ask for specific variables to be shown. Fixes #4265
Note that I did ultimately backport this enhancement into the fish 2.7 development (aka |
Many of us have written something like my
show
function:However, this has at least two drawbacks:
$var
syntax provides no way to ask for the value(s) from a specific scope.These drawbacks means it is much harder to give simple commands to help someone understand why their
set
commands aren't having the desired outcome. Such as in issue #4263. So I propose adding-S
/--show
flags toset
to do the same thing as myshow
function but without the drawbacks. This would also be extremely useful in our unit tests where we also have ashow
function and employ other techniques to determine if a var is (un)set correctly.The text was updated successfully, but these errors were encountered: