Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle right prompts in webconfig #7930

merged 2 commits into from
Apr 21, 2021


Copy link

@faho faho commented Apr 14, 2021


This allows webconfig to show and save fish_right_prompt if it is defined in a sample (or the current prompt).

It will not remove an existing fish_right_prompt if there is one.

It looks like this:


Fixes issue #736 (at least for fish_right_prompt, I don't think we need more).

In addition (and this is optional, it was just nice to get a better screenshot), this adds a slightly simplified version of my own prompt as the "Disco" sample. Here's a preview:


(the $PWD color depends on the sha of $PWD - this requires sha256sum to be available. if not it'll gracefully fallback to $fish_color_cwd. It will also only show user@host if necessary)


  • Changes to fish usage are reflected in user documentation/manpages.
  • Tests have been added for regressions fixed
  • User-visible changes noted in CHANGELOG.rst

@faho faho added this to the fish 3.3.0 milestone Apr 14, 2021
This gets fish to print the right prompt of any sample if it has any,
and then shows it separately.

If there is a right prompt, it will also save it. If not, it will *not* overwrite an existing right prompt.
Some features:

- A nice `►` prompt char with a fallback for non-utf8 systems
- The $PWD is colored depending on its sha, so different directories
  are colored differently, but each directory stays the same
- User@Host is only shown if not on the local machine (ssh or
- A right prompt with a nice git display, date, duration of the last
  command (if it took over 100ms), and virtualenv
Copy link
Member Author

faho commented Apr 17, 2021

Changed the layout by removing the spacer div, instead letting the left prompt grow. It now looks like


Copy link

This looks great to me! Awesome!

@faho faho merged commit f236410 into fish-shell:master Apr 21, 2021
@faho faho deleted the webconfig-right branch April 21, 2021 15:01
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants