Skip to content

Prompt Customization instructions for starship.rs #155

@david-alpert-os

Description

@david-alpert-os

Is your feature request related to a problem? Please describe.
When using Starship.rs I would like to customize my Starship prompt and add the git mob status to the command line for visibility.

Additional context
This snippet seems to work

# ~/.config/starship.toml

[custom.git_mob_status]
command = 'if [[ "$(git mob-print --initials 2>/dev/null)" == "" ]]; then echo "(solo)"; else echo "($(git mob-print --initials))"; fi'
when = ''' command -v git-mob '''
format = '[$output]($style) '

Documentation on custom additions to the command prompt are here
https://starship.rs/config/#custom-commands

Observations:

  • the if/then syntax is intended to show "solo" when the list of mob initials is empty. can be customized further to show an empty string instead.

Let's add this sample into the repo's README.md documentation with the other shell customization scripts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions