Feature: Command preview and execution

  Before handing off to restic, the session shows the resolved
  command and asks the user to confirm. This gives the user a
  chance to review what will run and go back to correct mistakes.

  Rule: The confirmation screen shows the resolved restic command

    Scenario: Reviewing the command before execution
      Given the user has completed all required screens
      When the confirmation screen is shown
      Then it displays the resolved restic command line
      And it displays any environment variables that will be set
      And the user can confirm to proceed

    Scenario: Confirming execution
      Given the confirmation screen is showing
      When the user confirms
      Then restic is executed with the resolved configuration

    Scenario: Going back from the confirmation screen
      Given the confirmation screen is showing
      When the user presses Esc
      Then they return to the last visible screen of the flow
      And their previous answers are preserved

  Rule: --show-command prints the command and exits without executing

    Scenario: --show-command in interactive mode
      Given the user launched keld interactively with --show-command
      When the confirmation screen would normally appear
      Then the resolved command is printed as text
      And the output format matches non-interactive --show-command
      And the session exits without executing restic
