Skip to content

feat(shell-plugin): add Fish shell plugin port of ZSH plugin#2921

Closed
FabioLissi wants to merge 1 commit intotailcallhq:mainfrom
FabioLissi:feat/fish-shell-plugin
Closed

feat(shell-plugin): add Fish shell plugin port of ZSH plugin#2921
FabioLissi wants to merge 1 commit intotailcallhq:mainfrom
FabioLissi:feat/fish-shell-plugin

Conversation

@FabioLissi
Copy link
Copy Markdown

Summary

Adds a complete Fish shell plugin port of the existing ZSH plugin, giving Fish users the same :command shortcuts, fzf-powered completions, and right-prompt integration available to ZSH users today.

Context

Fish is a popular shell with a significant user base, but the Forge shell plugin has only shipped as a ZSH plugin. Fish users who want :command dispatch, @file tab completion, and right-prompt session info currently have no supported path to get there. This PR brings the Fish experience to parity with ZSH by porting all the existing ZSH plugin functionality to native Fish.

The plugin is structured as a Fisher-compatible plugin and is already published and tested at FabioLissi/forge-fish.

Changes

  • Added shell-plugin/fish/ alongside the existing shell-plugin/ ZSH plugin
  • Ported all 40+ :command handlers to Fish functions
  • Implemented @file and :command Tab completion using fzf
  • Added right-prompt integration (works alongside starship and other prompt themes)
  • Added full tab completion for the forge CLI binary (subcommands, flags)
  • Included a README.md covering installation, usage, and plugin structure

Key Implementation Details

Fish doesn't use bindkey or ZLE like ZSH — instead the Enter key is intercepted via fish_user_key_bindings and a custom _forge_accept_line function that checks whether the buffer starts with : before handing control back to Fish. All :command handlers are standalone _forge_action_*.fish functions dispatched by a central router. The right prompt hooks into fish_right_prompt without clobbering any existing right prompt output.

Use Cases

# Send a prompt
: explain what this regex does

# Switch models interactively
:model

# AI-generated commit message
:commit

# Browse conversations with fzf
:conversation

# Pick a file to tag
: review this @<Tab>

Testing

# Install Fisher if needed
curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source

# Install the plugin from the fork
fisher install FabioLissi/forge-fish

# Open a new shell and verify :command routing works
: hello forge

# Test Tab completion
# Type : then press Tab — should open fzf command picker
# Type @ then press Tab — should open fzf file picker

Alternatively, clone this repo and manually copy shell-plugin/fish/ into ~/.config/fish/ (completions → completions, conf.d → conf.d, functions → functions).

Links

Adds a complete Fish shell plugin under shell-plugin/fish/ that provides
the same UX as the existing ZSH plugin for Fish users.

Features:
- :command dispatch with 40+ commands via Enter key override
- fzf-powered Tab completion for @file paths and :command names
- Right prompt showing active agent, model, conversation, and reasoning effort
- Session overrides (model, provider, reasoning effort) without editing config
- Full tab completion for the forge CLI binary

Structured as a Fisher-compatible plugin (fisher install FabioLissi/forge-fish).
Also available standalone via the Fisher plugin registry at:
https://github.com/FabioLissi/forge-fish
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Fabio Lissi seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@github-actions github-actions bot added the type: feature Brand new functionality, features, pages, workflows, endpoints, etc. label Apr 10, 2026
@amitksingh1490
Copy link
Copy Markdown
Contributor

@FabioLissi Let’s continue the discussion on #2779. We’re currently thinking about moving extensions to the community, and we’d love to collaborate with you on that PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: feature Brand new functionality, features, pages, workflows, endpoints, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants