Skip to content
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

Feature Request: 'set --erase' for multiple/all scopes #7711

Closed
daveman1010221 opened this issue Feb 12, 2021 · 2 comments · Fixed by #9280
Closed

Feature Request: 'set --erase' for multiple/all scopes #7711

daveman1010221 opened this issue Feb 12, 2021 · 2 comments · Fixed by #9280

Comments

@daveman1010221
Copy link

Hello!

I'm not in the practice of requesting features, but I feel this is one that is missing. It seems that un-setting a variable can be more difficult than it really should be, requiring a number of logic checks to ensure a setting is really gone. Could we have a:

set --ERASE foo

wherein, it actually un-sets the variable, regardless of scoping? I will even submit a pull request, if you agree. :-)

Thanks.

Additional details:

fish --version
fish, version 3.1.2

Ubuntu, Groovy
uname -a
Linux xxxxxxxx 5.8.0-7642-generic #47161228899020.10b8113e7dev-Ubuntu SMP Wed Feb 3 01:55:26 U x86_64 x86_64 x86_64 GNU/Linux

echo $TERM
xterm-256color

@faho
Copy link
Member

faho commented Feb 12, 2021

There is set --erase to "just erase a variable", but it only erases the closest scope.

If I'm correct, what you're asking for is "erase in all scopes"?

I'd probably just allow multiple scopes to be specified with --erase, so you can do

set --erase --local --global --universal foo

or

set -elgU foo

for short.

[Edited by a team member for correctness/posterity.]

@daveman1010221
Copy link
Author

That sounds great.

@zanchey zanchey added this to the fish-future milestone Feb 13, 2021
@faho faho changed the title Feature Request: 'set --ERASE' Feature Request: 'set --erase' for multiple/all scopes Mar 4, 2021
mqudsi added a commit that referenced this issue Oct 20, 2022
Allow erasing in multiple scopes in one go. Closes #7711.
@faho faho modified the milestones: fish-future, fish 3.6.0 Oct 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants