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_historysetting (default off), persisted and cloud-synced like other input settings. HistoryEntryalready recordspwdfor Warp-executed commands, so no storage/schema changes are needed; v1 matches pwd strings exactly.Ctrl+Gtoggle follows theInsertLastWordPrevCommandaction/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-specorready-to-implement→ #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
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 checkto trigger another check.