Open allanday opened 3 years ago
I was recently playing around with some ideas for this, and came up with:
The initial "f33" with coloured background is supposed to indicate the current toolbox. This would require that we ensure that there's a short name for each toolbox. We could also assign a different colour to each toolbox, to use as the background for this short ID.
The format for the rest of the prompt was: <current project folder> <git branch> <current dir>
, but I suspect that that's out of scope for this ticket.
I will link https://github.com/containers/podman/issues/6192 here as this could help us in improving the prompt experience.
This is not a universal solution, but I added these three lines to my starship
config:
[env_var]
variable = "containers"
format = "[🔧](fg:177)"
And now my prompt has a wrench when I'm in a podman shell (and have access to my home dir)
(once https://github.com/containers/podman/issues/6192 is completed, the prompt can be a lot more precise)
Now that https://github.com/containers/podman/issues/6192 is done, this is what I use with Starship to have the current toolbox name (and the  ) in my prompt:
[custom.toolbox]
shell = [ "sh", "--norc" ]
command = """ grep -Po 'name="\\K[^"]+' /run/.containerenv """
when = "test -f /run/.containerenv"
format = "[ $output]($style) "
style = "#808080"
One of the main challenges using toolbox is knowing which environment your prompt is in. Our current approach to this:
Various issues here:
toolbox
. Like the hexagon, it doesn't differentiate between toolboxes.This is a somewhat complicated topic, since we have to think about the overall structure of the prompt. We also maybe need to think about the various tools that exist for doing fancy prompts.