Skip to content

docs: add fish_jj_prompt documentation - #12758

Open
abhayjnayakk wants to merge 1 commit into
fish-shell:masterfrom
abhayjnayakk:docs/fish-jj-prompt
Open

docs: add fish_jj_prompt documentation#12758
abhayjnayakk wants to merge 1 commit into
fish-shell:masterfrom
abhayjnayakk:docs/fish-jj-prompt

Conversation

@abhayjnayakk

Copy link
Copy Markdown

Summary

  • Add a command documentation page for fish_jj_prompt.
  • Link it from the helper function list, fish_vcs_prompt docs, and prompt guide.

Fixes #12756

Testing

  • Checked the new and updated RST files for expected references with a Python script.
  • Could not run the full Sphinx docs build locally because Sphinx is not installed in this environment.

Made with Cursor

Document fish_jj_prompt alongside the other VCS prompt helpers so it appears in the command index and prompt guide.

Fixes fish-shell#12756

Co-authored-by: Cursor <cursoragent@cursor.com>
Description
-----------

The ``fish_jj_prompt`` function displays information about the current Jujutsu repository, if any.

@krobelus krobelus May 24, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jujutsu

need a link to explain what this is, like for example fish_git_prompt.rst links to https://git-scm.com


The ``fish_jj_prompt`` function displays information about the current Jujutsu repository, if any.

It currently reports whether the working copy commit has conflicts.

@krobelus krobelus May 24, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

currently

maybe drop this word?


If ``jj`` is not installed, or the current directory is not in a Jujutsu repository, ``fish_jj_prompt`` returns 1 and prints nothing.

See also :doc:`fish_vcs_prompt <fish_vcs_prompt>`, which will call all supported version control prompt functions, including Jujutsu, git and Mercurial.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the "including" line is out of sync with fish_git_prompt and others

See also :doc:`fish_vcs_prompt <fish_vcs_prompt>`, which will call all supported version control prompt functions, including Jujutsu, git and Mercurial.

Example
-------

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could not run the full Sphinx docs build locally because Sphinx is not installed in this environment.

if you want to use uv, you can use uv run cargo xtask html-docs and uv run cargo xtask check etc.

A simple prompt that displays Jujutsu information::

function fish_prompt
printf '%s %s$' $PWD (fish_jj_prompt)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these examples don't seem good because fish_jj_prompt is usually an empty list, so we get a weird trailing space

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs: fish_jj_prompt is undocumented?

2 participants