Skip to content

Conversation

@mqudsi
Copy link
Contributor

@mqudsi mqudsi commented Feb 21, 2024

... even if the file hasn't changed. This addresses an oddity in the following case:

  • Shell is started,
  • function foo is sourced from foo.fish
  • foo.fish is externally edited and saved
  • <Loaded definition of foo is now stale, but fish is unaware>
  • funced foo loads type -p foo showing changed definition, user exits $EDITOR saving no changes (or with $status 0, more generally).
  • Stale definition of foo remains

... even if the file hasn't changed. This addresses an oddity in the following
case:

* Shell is started,
* function `foo` is sourced from foo.fish
* foo.fish is *externally* edited and saved
* <Loaded definition of `foo` is now stale, but fish is unaware>
* `funced foo` loads `type -p foo` showing changed definition, user exits
  $EDITOR saving no changes (or with $status 0, more generally).
* Stale definition of `foo` remains
@mqudsi mqudsi merged commit 2c2ab0c into fish-shell:master Feb 22, 2024
@mqudsi mqudsi deleted the funced_source branch February 22, 2024 18:45
@zanchey zanchey added this to the fish 3.7.1 milestone Feb 23, 2024
faho pushed a commit that referenced this pull request Mar 13, 2024
... even if the file hasn't changed. This addresses an oddity in the following
case:

* Shell is started,
* function `foo` is sourced from foo.fish
* foo.fish is *externally* edited and saved
* <Loaded definition of `foo` is now stale, but fish is unaware>
* `funced foo` loads `type -p foo` showing changed definition, user exits
  $EDITOR saving no changes (or with $status 0, more generally).
* Stale definition of `foo` remains

(cherry picked from commit 2c2ab0c)
krobelus added a commit that referenced this pull request Apr 12, 2024
Regressed in 2c2ab0c (Always `source` file after `funced` (#10318),
2024-02-22) which was only intended for functions that are backed by a file.
vertesians pushed a commit to vertesians/fish-shell that referenced this pull request Apr 17, 2024
Regressed in 2c2ab0c (Always `source` file after `funced` (fish-shell#10318),
2024-02-22) which was only intended for functions that are backed by a file.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 24, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants