Skip to content

feat(psql): \W accepts an OTS argument to skip the prompt#434

Open
passcod wants to merge 1 commit into
psql-edit-buffer-fixfrom
psql-write-mode-arg
Open

feat(psql): \W accepts an OTS argument to skip the prompt#434
passcod wants to merge 1 commit into
psql-edit-buffer-fixfrom
psql-write-mode-arg

Conversation

@passcod
Copy link
Copy Markdown
Member

@passcod passcod commented May 29, 2026

🤖 Enabling write mode with \W always prompted interactively for an OTS value. This lets an OTS be supplied inline as \W <ots>, recording it directly and skipping the prompt; bare \W still prompts as before.

  • The \W parser now optionally captures a trimmed trailing argument.
  • The optional OTS is threaded through Metacommand::WriteMode, ReplAction::ToggleWriteMode, and handle_write_mode_toggle.
  • A non-empty argument is recorded into the same state field as the prompted path, so the audit records it identically; an empty or absent argument falls back to the interactive prompt.
  • Help text updated to \W [ots].

Stacked on the \e edit-buffer fix.

Bare \W still prompts interactively for the OTS. \W <text> records the
trimmed argument directly as the OTS, flowing into the same audit field
as the prompted value, so the recorded OTS is identical.

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant