Add Support for the Fish Prompt

Open
#1,776 2 comments 16 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
fish
Domain
cli

Research direction

Start with the fish_prompt documentation and Warp's PS1 compatibility table, both linked in the issue, then identify the prompt compatibility entry point. Compare the supplied fish_prompt example with current behavior; done means fish_prompt customization is supported without regressing existing prompt compatibility.

Written by the indexing model from the issue text.

Description

area:shell-terminal area:ui-framework enhancement triaged
Discord username (optional)

RobbieMcKinstry#5296

Describe the solution you'd like?
Warp does not support the fish [prompt](https://fishshell.com/docs/current/cmds/fish_prompt.html) as [per the documentation](https://docs.warp.dev/features/prompt#ps1-compatibility-table).

Support for the `fish_prompt` function would further increase compatibility with other terminals.
Is your feature request related to a problem? Please describe.
I know Warp has it's own prompts for git and the like, but I was happy with the customization I had done before switching to Warp.

For example, this is my prompt in iTerm:


function fish_prompt
    # set up local variables
    set -l last_status $status
    set -l red 'FF2D00'
    set -l green '25FA38'
    set -l git_blue '76B3E3'
    set -l dir_pink 'A71FB7'
    # capture the current git branch
    set -l git_branch (git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||')
    # capture the pwd but delete everything until the last slash
    set -l this_dir_name (pwd | sed 's:.*/::')

    # print a check if the last command was successful
    # otherwise print an X
    if [ $last_status -ne 0 ]
      set_color $red
      printf '✘ '
    else
      set_color $green
      printf '✓ ' 
    end

    if set -q this_dir_name
      set_color $dir_pink
      printf '%s ' $this_dir_name
    end

    # now, set the color for the git prompt
    # and print it
    if set -q git_branch
      set_color $git_blue
      printf '%s ' $git_branch
    end
end
Additional context

No response

How important is this feature to you?

4

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

No response

Dominant language
Rust
Stars
65.1k
Forks
5.6k
PR merge metrics
PR metrics pending

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.

More from warpdotdev/warp

All issues in warpdotdev/warp

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.