lix/doc/manual/rl-next/repl-edit-store.md
Max “Goldstein” Siling 1a6d7a3af4 src/libcmd/repl.cc: avoid unneeded reload after :e
If `:edit`ing a store path, don't reload repl afterwards
to avoid losing local variables: store is immutable,
so "editing" a store path is always just viewing it.

Resolves: #341
Change-Id: I3747f75ce26e0595e953069c39ddc3ee80699718
2024-07-30 16:08:26 +00:00

12 lines
392 B
Markdown

---
synopsis: "`:edit`ing a file in Nix store no longer reloads the repl"
issues: [fj#341]
cls: [1620]
category: Improvements
credits: [goldstein]
---
Calling `:edit` from the repl now only reloads if the file being edited was outside of Nix store.
That means that all the local variables are now preserved across `:edit`s of store paths.
This is always safe because the store is read-only.