Skip to content

feat: Truncate directory name to git root - #421

Open
Froopity wants to merge 3 commits into
pure-fish:masterfrom
Froopity:feat/git-truncate
Open

feat: Truncate directory name to git root#421
Froopity wants to merge 3 commits into
pure-fish:masterfrom
Froopity:feat/git-truncate

Conversation

@Froopity

@Froopity Froopity commented Jul 15, 2026

Copy link
Copy Markdown

Documentation

This feature adds the ability to truncate the directory name to start at the current git repository root rather than filesystem root, similar to the Starship truncate_to_repo option.

Example

mirage-pure_truncate_prompt_current_directory_to_git_root=false mirage-pure_truncate_prompt_current_directory_to_git_root=true

Usage

set --universal pure_truncate_prompt_current_directory_to_git_root true

Questions for Maintainers

I wasn't sure whether this should be under CWD or Git, I chose CWD as it is not actually dependent on the git feature being enabled and changes the directory name rather than branch name.

There were also no examples in the documentation page of a section with two different enabled/disabled flags. Maybe it should be it's own feature? Would love some advice.

I also did not want to presume that it should be enabled by default, but I think it's pretty nice :)

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 (we can help you 🤗 ):
  • Customization is available ;
  • Feature is implemented.

@Froopity
Froopity marked this pull request as ready for review July 15, 2026 07:54
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.

2 participants