Skip to content

feat: add transient prompt support (Fish 4.1.0+)#389

Merged
edouard-lopez merged 11 commits intomasterfrom
copilot/implement-transient-prompt
Dec 2, 2025
Merged

feat: add transient prompt support (Fish 4.1.0+)#389
edouard-lopez merged 11 commits intomasterfrom
copilot/implement-transient-prompt

Conversation

Copy link
Contributor

Copilot AI commented Nov 25, 2025

related: fixes Transient prompt #206

Implements transient prompt using Fish 4.1.0's native fish_transient_prompt feature. When enabled, previous prompts are replaced with just the prompt symbol (), removing stale contextual info (git status, path) from terminal history.

How to test pre-release?

☠️ Feature can be unstable and break your prompt!

fisher install pure-fish/pure@copilot/implement-transient-prompt
set --universal pure_enable_transient_prompt true

Requires Fish 4.1.0+.

First contribution?

Check the 👍 contributing guide for code and naming conventions.

Specs

New config in conf.d/pure.fish

_pure_set_default pure_enable_transient_prompt false

# Enable Fish native transient prompt when pure_enable_transient_prompt is true
if set --query pure_enable_transient_prompt; and test "$pure_enable_transient_prompt" = true
    set --global fish_transient_prompt 1
end

New function _pure_transient_prompt.fish

Renders simplified prompt (colored symbol only) when fish_prompt --final-rendering is called.

Documentation

Usage

set --universal pure_enable_transient_prompt true

Acceptance Checks

  • Documentation is up-to-date:
    • Add entry in feature list of README.md ;
    • Add entry in features' overview in docs/ ;
    • Add section in feature list to document
      • Features' flag ;
      • Prompt symbol ;
  • Default are defined in conf.d/pure.fish for:
    • Feature flag ;
    • Symbol ;
  • Tests are passing (I can help you 🤗 ):
    • Config are tested (cf. tests/_pure.test.fish) ;
    • Feature is tested in tests/_pure_transient_prompt.test.fish ;
  • Customization is available ;
  • Feature is implemented.
Original prompt

This section details on the original issue you should resolve

<issue_title>Transient prompt</issue_title>
<issue_description>Is there any interest in implementing a transient prompt similar to that of Powerlevel10k?

I haven't looked at any of its code, so I don't know if it would actually be possible or easy to implement in fish, but it would save a little bit of space and look nice, IMO.</issue_description>

<agent_instructions>Help me implement transient prompt in pure.

  • use the link in the conversation to understand what it is
  • use instruction in ./AGENTS.md for your code</agent_instructions>

Comments on the Issue (you are @copilot in this section)

@edouard-lopez @faho does that sound feasible to you?

https://github.com/rafaelrinaldi/pure/blob/ec5a708712d453e2305fd4b987a4846d9781c1d8/functions/fish_prompt.fish#L1-L11</comment_new>
<comment_new>@edouard-lopez
Thanks, I'm closing then</comment_new>
<comment_new>@edouard-lopez
@cole-h could #65 be an alternative to your request?

As a side note, asciinema might be interesting</comment_new>
<comment_new>@edouard-lopez
I'm open to review PR, but could you please elaborate on what behaviour you expect? This will help for the tests.</comment_new>
<comment_new>@edouard-lopez
Hey, latest Fish 4.1.0 added native transient prompt. Feel free to reopen the issue and submit a PR 💖</comment_new>


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Add transient prompt implementation for fish shell feat: add transient prompt support (Fish 4.1.0+) Nov 25, 2025
Copilot AI requested a review from edouard-lopez November 25, 2025 17:42
@edouard-lopez edouard-lopez force-pushed the copilot/implement-transient-prompt branch from ef67500 to d40f124 Compare November 27, 2025 03:42
@edouard-lopez edouard-lopez force-pushed the copilot/implement-transient-prompt branch from 224765d to c6bd64d Compare December 1, 2025 10:57
@edouard-lopez edouard-lopez force-pushed the copilot/implement-transient-prompt branch 4 times, most recently from 84ab891 to f0bc9b2 Compare December 1, 2025 22:09
* disable checkPhase for CI, we run test separately
* mock `id` value for NixOS context
* run before_each hook
* correct `_mock_response` argument
@edouard-lopez edouard-lopez force-pushed the copilot/implement-transient-prompt branch from f0bc9b2 to 61eafe3 Compare December 1, 2025 22:19
@edouard-lopez edouard-lopez marked this pull request as ready for review December 2, 2025 00:06
@edouard-lopez edouard-lopez merged commit b56fdbb into master Dec 2, 2025
14 checks passed
@edouard-lopez edouard-lopez deleted the copilot/implement-transient-prompt branch December 2, 2025 00:06
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.

Transient prompt

2 participants