Skip to content

Remove fish_greeting.fish to stop overriding user's custom greeting#387

Merged
edouard-lopez merged 11 commits intomasterfrom
copilot/remove-fish-greeting-file
Nov 25, 2025
Merged

Remove fish_greeting.fish to stop overriding user's custom greeting#387
edouard-lopez merged 11 commits intomasterfrom
copilot/remove-fish-greeting-file

Conversation

Copy link
Contributor

Copilot AI commented Nov 7, 2025

related: fixes #175

How to test pre-release?

☠️ Feature can be unstable and break your prompt!

fisher install pure-fish/pure@copilot/remove-fish-greeting-file

First contribution?

Check the 👍 contributing guide for code and naming conventions.

Specs

Pure no longer ships fish_greeting.fish, allowing users to provide their own. Users who relied on Pure suppressing the default greeting must now:

# Option 1: Empty greeting
set -U fish_greeting

# Option 2: Custom greeting with release check
function fish_greeting
    _pure_check_for_new_release
end

Changes

Removed:

  • functions/fish_greeting.fish
  • tests/fish_greeting.test.fish

Updated:

  • conf.d/_pure_init.fish - Uninstall removes old Pure fish_greeting symlinks (pattern: pure-fish/pure|/theme-pure/|/pure/)
  • docs/components/features-list.md - Instructions for _pure_check_for_new_release in custom greeting
  • docs/components/troubleshooting.md - Section on customizing fish greeting

Tests:

  • Verify Pure symlinks removed during uninstall
  • Verify non-Pure symlinks preserved
  • Verify user files preserved

Documentation

# Suppress greetingset -U fish_greeting

# Or create custom greeting at ~/.config/fish/functions/fish_greeting.fishfunction fish_greeting
      _pure_check_for_new_release  # optional
  end

Acceptance Checks

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

This section details on the original issue you should resolve

<issue_title>Remove fish_greeting.fish from this prompt</issue_title>
<issue_description>Installing this prompt overrides my own fish_greeting.fish file. While I understand its nice to get rid of the default fish greeting, shouldn't that be the responsibility of the user or a separate plugin, and not the responsibility of a prompt?

In other words, I feel it should be possible to mix and match prompts and greetings, rather than one controlling the other.

On another note: thanks very much for this prompt - I particularly like how the arrow direction switches with fish's vim mode - that's much more subtle than any mode indicator I had devised!</issue_description>

<agent_instructions>Could you make a pull request regarding this issue. Check the contributing.md for the coding style and the PR template for the requirements</agent_instructions>

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

@edouard-lopez Hello @neon64, thanks for the feedback.

Was you fish_greeting.fish located in $HOME/.config/fish/functions/fish_greeting.fish? That's where installer place our fish_greeting.fish file, its the recommended way to leverage autoload mechanism.

Solution

You can either remove $HOME/.config/fish/functions/fish_greeting.fish and fallback to your setup or copy your setup in it.

Discussion

I understand your point about responsability but pure vision is to provide a clean and pure experience of the prompt. So, removing greeting and other presets sounds in line with this.

However, one is free to customize upon it as described above.

Cheers!</comment_new>
<comment_new>@edouard-lopez
Thanks for the feedback, do you think I can automate the addition of the call?</comment_new>
<comment_new>@edouard-lopez

Current Behaviour

Currently, on new session, pure checks for new release and show command to install, as we override the fish_greeting.fish file.

Proposed Behaviour

⚠️ Introduce a breaking change in pure's behaviour that will require user action.

  • Stop overriding user functions/fish_greeting.fish
  • Document how to add the new release check
  • Suppress Fish's default greeting, as suggested by @jorgebucaran
  • Provide instructions to stdout on install as suggested by @wjagodfrey

Does that sound right, to you?</comment_new>
<comment_new>@edouard-lopez

You could also follow the pattern of extending the file if it exists,

How would you do that programmatically?

provide instructions to stdout on install

That's a good idea!</comment_new>
<comment_new>@edouard-lopez
@jorgebucaran I defined a custom fish_greeting function in the project. I believe @wjagodfrey own file is being overwritten during install. Emptying fish_greeting variable won't resolve the issue when people have added a custom fish_greeting function.

However, we can:

  1. rename the project's fish_greeting.fish to _pure_fish_greeting.fish so it doesn't override user file ;

  2. add a post_install event handler that check the situation so that:

    • when fish_greeting.fish is missing, use our (i.e. rename _pure_fish_greeting.fish as fish_greeting.fish) ;

    • when fish_greeting.fish already exists, output instruction to add call to _pure_check_for_new_release:

      echo "_pure_check_for_new_release" >> $fish_function_path/fish_greeting.fish
      

@wjagodfrey I'm open to PR, here are some entry points:

The project has a docker container you can use (cf. makefile)</comment_new>


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 8 commits November 7, 2025 08:18
Co-authored-by: edouard-lopez <1212392+edouard-lopez@users.noreply.github.com>
Co-authored-by: edouard-lopez <1212392+edouard-lopez@users.noreply.github.com>
Co-authored-by: edouard-lopez <1212392+edouard-lopez@users.noreply.github.com>
Co-authored-by: edouard-lopez <1212392+edouard-lopez@users.noreply.github.com>
Co-authored-by: edouard-lopez <1212392+edouard-lopez@users.noreply.github.com>
Co-authored-by: edouard-lopez <1212392+edouard-lopez@users.noreply.github.com>
Co-authored-by: edouard-lopez <1212392+edouard-lopez@users.noreply.github.com>
Co-authored-by: edouard-lopez <1212392+edouard-lopez@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove fish_greeting.fish from the prompt Remove fish_greeting.fish to stop overriding user's custom greeting Nov 7, 2025
Copilot AI requested a review from edouard-lopez November 7, 2025 08:30
Copy link
Member

@edouard-lopez edouard-lopez left a comment

Choose a reason for hiding this comment

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

I want to preserve the fish_greeting.fish file for existing user as they might have edited it. New install should not add the fish_greeting.fish file and just empty the variable fish_greeting so user can customise their experience.

@edouard-lopez edouard-lopez marked this pull request as ready for review November 25, 2025 15:31
@edouard-lopez edouard-lopez merged commit 75f34b2 into master Nov 25, 2025
12 checks passed
@edouard-lopez edouard-lopez deleted the copilot/remove-fish-greeting-file branch November 25, 2025 15:58
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.

Remove fish_greeting.fish from this prompt

2 participants