warpdotdev / warpdotdev/warp

Execution a command on tab switch

Open
#3,614 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area:window-tabs-panes enhancement triaged
Dominant language
Rust
Stars
65.1k
Forks
5.6k
PR merge metrics
PR metrics pending

Description

Discord username (optional)

No response

Describe the solution you'd like?

I would like a custom command (in my head I'm thinking a shell command) to be executed whenever I switch tabs.

Is your feature request related to a problem? Please describe.

I use a Go language version switcher which swaps out the underlying binary. This works fine when I cd into a directory because I can read the version I want from a file (e.g. .go-version)

But when I manually jump between tabs there is no cd being actioned and so my shell script (https://github.com/Integralist/dotfiles/blob/main/.zshrc#L522-L526) that reads the file to identify the version I want to use is never actioned.

So what happens, I have two tabs open. In tab 1 I have a Go project that uses Go version 1.21. In tab 2 I cd to another Go project that uses Go 1.18 which causes my go binary to switch to that required version. But now I click back to tab 1 and the underlying binary is still on 1.18 when that project requires 1.21 and so I just have to manually remember to re-cd the directory.

Additional context

No response

How important is this feature to you?

3

Warp Internal (ignore) - linear-label:770f6576-d6c0-4e4f-a259-fc64b5156087

None

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how tab switches are handled and where shell commands are launched; the issue does not name implementation files or tests. Review the referenced .zshrc lines 522-526 for the expected version-switching behavior. Done means a configured command runs on tab switch with the active tab's directory context, without requiring a manual cd.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, shell
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.