2 unstable releases

new 0.2.0 Feb 27, 2025
0.1.0 Feb 26, 2025

#563 in Command line utilities

39 downloads per month

MIT license

41KB
757 lines

jj-starship

starship plugin for jj

Features

  • show bookmarks in you current commits history and how many commits you are ahead of them.
    • filter bookmarks by name.
    • filter bookmarks by distance to current commit.
    • limit number of bookmarks that will be printed.
    • overwrite bookmark filter per workspace.
  • show current commit text.
  • show current commit state (Conflict, Divergent, Hidden).
  • show current commit metrics (changed files, insertions, deletions).
    • define a custom template for how these changes should be presented.
  • print in colors.
  • customize settings via config file.
  • print a default config file.
  • print the path to the default config file path.
  • set custom config location via command line or environment args.

Installation

From Source

  cargo install starship-jj --locked

Usage

  1. Enable the plugin in you starship.toml
format="""
...
${custom.jj}\
...
"""

#...

[custom.jj]
command='''starship-jj --ignore-working-copy starship prompt'''
format = "[$symbol](blue bold) $output "
symbol = "󱗆 "
when = "jj root --ignore-working-copy"
  1. Configure what you want to see

starship-jj will load a configuration toml file either from the location provided via the --starship-config argument or from you OSs default config dir (Linus: "$XDG_CONFIG_DIR/starship-jj/starship-jj.toml" Windows: "%APPDATA%/starship-jj/starship-jj.toml").

If no config file exist starship-jj will use some sane default values.

You can see the default config location by using starship-jj starship config path.

You can also print the default configuration using starship-jj starship config default

The Repository also contains a starship-jj.toml file with all possible keys and documentation.

Dependencies

~37–51MB
~1M SLoC