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

Prevent not-yet-loaded functions from being loaded when erased #5951

Merged
merged 2 commits into from Jun 22, 2019

Conversation

faho
Copy link
Member

@faho faho commented Jun 21, 2019

Today, functions --erase $function does nothing if the function
hasn't been autoloaded yet.

E.g. run, in an interactive session

> functions --erase ls
> type ls

and be amazed that it still shows our default ls --color=auto
wrapper function.

This seems counter-intuitive - removing a function ought to remove it,
whether it had been executed before or not.

TODOs:

  • Changes to fish usage are reflected in user documentation/manpages.
  • Tests have been added for regressions fixed
  • User-visible changes noted in CHANGELOG.md

Today, `functions --erase $function` does nothing if the function
hasn't been autoloaded yet.

E.g. run, in an interactive session

    > functions --erase ls
    > type ls

and be amazed that it still shows our default `ls --color=auto`
wrapper function.

This seems counter-intuitive - removing a function ought to remove it,
whether it had been executed before or not.
@faho faho added the bug Something that's not working as intended label Jun 21, 2019
@faho faho added this to the fish 3.1.0 milestone Jun 21, 2019
@faho faho requested a review from ridiculousfish June 21, 2019 19:31
@sjuxax
Copy link
Contributor

sjuxax commented Jun 21, 2019

For reference, see Gitter discussion around https://gitter.im/fish-shell/fish-shell?at=5d0d2e637456db0bb82ce437

@ridiculousfish
Copy link
Member

LGTM. Please relnote this.

@faho faho merged commit 9b54a53 into fish-shell:master Jun 22, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 16, 2020
@faho faho changed the title Prevent not-yet-loaded functions from loaded when erased Prevent not-yet-loaded functions from being loaded when erased May 19, 2021
@faho faho deleted the tombstone-not-yet-loaded branch September 23, 2021 09:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something that's not working as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants