Skip to content

Convert the :navigation cluster to command types (#392)#25

Open
ChrisonSimtian wants to merge 1 commit into
cli-cmd-cakefrom
cli-cmd-navigation
Open

Convert the :navigation cluster to command types (#392)#25
ChrisonSimtian wants to merge 1 commit into
cli-cmd-cakefrom
cli-cmd-navigation

Conversation

@ChrisonSimtian

Copy link
Copy Markdown
Owner

Part of Fallout-build#392. Stacked on #16 — merge after it lands.

Per the locked decision, the five navigation verbs become discrete commands with names preserved (GetNextDirectory, PopDirectory, PushWithCurrentRootDirectory, PushWithParentRootDirectory, PushWithChosenRootDirectory) so the documented shell functions (nuke-/nuke//nuke./nuke..) keep working. Shared per-session state moves into an internal NavigationSession; PushWithChosenRootDirectoryCommand takes IConsolePrompts. Replaces the five DelegateCommand adapters; deletes Program.Navigation.cs.

Verification

Fallout.Cli.Tests 30 pass.


Re-raised fork-internally to move the cli-cmd stack off the main repo. Supersedes Fallout-build#403; same history and diff.

🤖 Generated with Claude Code

Lift the five directory-navigation handlers into discrete command types with their
names preserved (GetNextDirectory, PopDirectory, PushWithCurrentRootDirectory,
PushWithParentRootDirectory, PushWithChosenRootDirectory) so the companion shell
functions keep working. Shared per-session state moves into an internal
NavigationSession helper; PushWithChosenRootDirectory takes IConsolePrompts via the
constructor. Replaces the five DelegateCommand adapters; deletes Program.Navigation.cs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
namespace Fallout.Cli.Commands.Navigation;

/// <summary><c>fallout :GetNextDirectory</c>: prints (and consumes) the queued next directory.</summary>
public sealed class GetNextDirectoryCommand : IFalloutCommand

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔 They don't have to be public, do they? If not, keep them internal, so our IDEs will also flag dead code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

target/2026 Releases on the 2026 calendar line

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants