Skip to content

Spec: per-directory command history (GH5336) - #16636

Open
edgardmello wants to merge 1 commit into
warpdotdev:masterfrom
edgardmello:spec/per-directory-history
Open

edgardmello wants to merge 1 commit into
warpdotdev:masterfrom
edgardmello:spec/per-directory-history

Conversation

@edgardmello

@edgardmello edgardmello commented Oct 23, 2026 •

Copy link
Copy Markdown

Description

Adds the product and tech spec for per-directory command history (issue #5336, labeled ready-to-spec): an opt-in mode where up/down arrow command history is scoped to the current working directory, with a Ctrl+G toggle back to global history, mirroring the zsh per-directory-history plugin referenced in the issue.

Key points of the proposal:

  • One shared implementation in the existing up-arrow combiner (History::up_arrow_suggestions_for_terminal_surface), so the GUI inline history menu, GUI history search, and TUI history menu all behave identically.
  • New directory_scoped_history setting (default off), persisted and cloud-synced like other input settings.
  • HistoryEntry already records pwd for Warp-executed commands, so no storage/schema changes are needed; v1 matches pwd strings exactly.
  • Ctrl+G toggle follows the InsertLastWordPrevCommand action/binding precedent.

Discussion on the design is welcome here — this PR is the home for product/technical review per the contributing guide. Once the specs are approved, implementation continues on this same PR.

Linked Issue

  • The linked issue is labeled ready-to-spec or ready-to-implement → Per directory history #5336 (ready-to-spec).
  • Where appropriate, screenshots or a short video of the implementation are included below (especially for user-visible or UI changes). → N/A for this docs-only spec PR; screenshots will accompany the implementation commits.

Testing

N/A — this PR contains only specification documents (specs/GH5336/product.md, specs/GH5336/tech.md); there are no runtime code changes. The planned unit tests and manual validation steps (each mapped to a numbered product invariant) are specified in specs/GH5336/tech.md ("Testing and validation") and will be executed as part of the implementation on this PR after spec approval.

  • I have manually tested my changes locally with ./script/run → N/A (docs-only)

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

Co-Authored-By: Warp agent@warp.dev

Product and tech spec for scoping up-arrow command history to the
current working directory, per issue warpdotdev#5336 (label: ready-to-spec).

Co-Authored-By: Warp <agent@warp.dev>
@cla-bot

cla-bot Bot commented Oct 23, 2026

Copy link
Copy Markdown

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @edgardmello on file. In order for us to review and merge your code, each contributor must visit https://cla.warp.dev to read and agree to our CLA. Once you have done so, please comment @cla-bot check to trigger another check.

@github-actions github-actions Bot added the external-contributor Indicates that a PR has been opened by someone outside the Warp team. label Oct 23, 2026
@edgardmello edgardmello mentioned this pull request Oct 23, 2026
1 task done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external-contributor Indicates that a PR has been opened by someone outside the Warp team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant