pure-fish / pure

Pretty, minimal, and fast prompt for Fish shell inspired by sindresorhus/pure
https://pure-fish.github.io/pure/
MIT License
1.22k stars 132 forks source link

Improve `git` prompt during rebase conflicts #344

Open bphenriques opened 7 months ago

bphenriques commented 7 months ago

Hello, thank you for the project!

Short: when a rebase has conflicts, the base branch is shown rather than the current one.

Reproduce steps:

  1. Have two branches A
  2. Create a branch B out of A and change a file. Commit.
  3. Go to branch A and modify the same file. Commit.
  4. Go to branch B and git rebase A. It should prompt you that you have conflicts and you may need to resolve them.

Expectations: the current branch should still be B but in the middle of a rebase. Ideally it should show that we are in the middle of a rebase. The last line in the screenshot below:

image

My setup

Variables:

        set -U pure_enable_single_line_prompt true
        set -U pure_enable_virtualenv false
        set -U pure_color_success green
        set -U pure_shorten_window_title_current_directory_length 1
        set -g async_prompt_functions _pure_prompt_git

Regarding plugins besides pure, I have autopair, fish-async-prompt and some custom ones that have no relation with git. I can share my dotfiles (nix though) if helpful.

If there is interest, I can look into it and perhaps follow a similar format to powerlevel10k (I came from zsh). Suggestions?

Env

Pure

4.8.0

Fish

fish, version 3.7.0

OS/distribution

MacOS
bphenriques commented 7 months ago

Example from powerlevel10k:

image

Perhaps too verbose. At least it is clear we are in the middle of a rebase

aayushgakhar commented 2 weeks ago

https://github.com/aayushgakhar/pure wanted same. hows this

Screenshot 2024-08-06 at 11 39 42 PM
bphenriques commented 2 weeks ago

I like it 👍

aayushgakhar commented 2 weeks ago

glad you like it i also added some more stuff to the git prompt. it shows counts of files changed and staged and stuff. maybe i should add a flag to disable that. otherwise would be too crowded on a single line.

bphenriques commented 2 weeks ago

I personally like the minimal look of powerlevel10k when rebasing (where I am and how many rebasss left). I personally dont need much else. Not sure what philosophy we should use in Pure

aayushgakhar commented 2 weeks ago

yeah ik i just did that extra stuff cuz i had it in my p10k theme. I've added a flag (pure_enable_git_enhanced) which disables the additional features by default. left the rebasing stuff on.