Assign unnesting level to the last history level
Alpine 3.24 Success
Alpine 3.24 aarch64 Success
Arch Linux AUR Success
OpenBSD 7.8 Success

Surprise unnesting ~ is no fun.
This commit is contained in:
2026-08-04 06:16:34 +02:00
parent 60fcff0285
commit 338572806b
+3 -3
View File
@@ -2297,9 +2297,6 @@ fun load_config () {
else if (tokens.front () == "history")
load_history_level (tokens);
}
// FIXME: we don't reset unnest_depth when the last history level
// doesn't match the start directory.
}
fun save_config () {
@@ -2387,6 +2384,9 @@ int main (int argc, char *argv[]) {
load_colors ();
load_cmdline (argc, argv);
g.start_dir = g.cwd = initial_cwd ();
// XXX: We might want to store this within history levels.
if (g.levels.empty () || g.levels.back ().path != g.cwd)
g.unnest_depth = 0;
reload (false);
pop_levels (g.cwd);
update ();