Skip to content

Display only stash count #9572

@Dreamsorcerer

Description

@Dreamsorcerer

I'd like to be able to display just the stash count, but the current version of fish seems to have broken this (it mostly worked on 3.1, which is the version installed on Ubuntu 20.04).

If I do:

set -U __fish_git_prompt_show_informative_status 1
set -U __fish_git_prompt_showstashstate 1
set -U __fish_git_prompt_status_order stashstate

Then the count will not be displayed. I think that's because this disables the informative status entirely:
https://github.com/fish-shell/fish-shell/blob/master/share/functions/fish_git_prompt.fish#L259-L265

Additionally, I'd also point out that it was a little confusing when setting these variables, as to why there were global variables shadowing them. It seems the script sets a global variable if it's not already set, not sure if maybe that should be changed to a local variable to be less confusing?
https://github.com/fish-shell/fish-shell/blob/master/share/functions/fish_git_prompt.fish#L229

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions