Replies: 4 comments 1 reply
-
Oh my posh maybe would also be neat |
Beta Was this translation helpful? Give feedback.
-
Something that was brought up in one of the issue threads at starship/starship, which is also the case for the current wiki entry, is that snapshotting will happen on every prompt if Coincidentally, I just started using Starship a few hours before the OP was published! Thus far, I customised it to show three pieces of information that I care about in my (all colocated) repos, plus relying on the [git_commit]
only_detached = false
[custom.jj_branch]
when = "jj workspace root --ignore-working-copy"
command = '''jj log -r "(immutable_heads()..@):: & branches()" -T 'local_branches.join("\n") ++ "\n"' --no-graph --ignore-working-copy | head -n 1'''
style = 'yellow'
[custom.jj_op]
when = "jj workspace root --ignore-working-copy"
command = 'jj op log -n 1 -T "id.short()" --no-graph --ignore-working-copy'
symbol = 'op:'
style = "bright-yellow"
[custom.jj_git_notinsync]
when = '[ -n "${jj_git_head:=$(jj log -T commit_id --no-graph --ignore-working-copy -r HEAD@git)}" ] && [ -n "${git_head:=$(git rev-parse HEAD)}" ] && [ "$git_head" != "$jj_git_head" ]'
command = 'jj log -T "commit_id.short()" --no-graph --ignore-working-copy -r HEAD@git'
symbol = 'jj:git≠'
style = 'bold red' (Note that it only shows one branch, even when the line of work includes multiple ones, and gives no indication if there are more.) |
Beta Was this translation helpful? Give feedback.
-
I can maybe contribute more to this later. I can just say that at some point I had --ignore-working-copy enabled and decided for me that that is relatively unusable since it very often displayed "outdated" information in the prompt. |
Beta Was this translation helpful? Give feedback.
-
Also fell free to take ownership on starship/starship#5772. I'm daily-driving it since March but I have no time to finish this pr :( |
Beta Was this translation helpful? Give feedback.
-
Hi,
Currently, there are two open PRs:
We also have:
@maralorn, I am not the author of either of these PRs. However, would you like to take a look and possibly give some suggestions, since you already have a working solution?
Thanks! 🥞
Beta Was this translation helpful? Give feedback.
All reactions