reujab / silver

A cross-shell customizable powerline-like prompt with icons
MIT License
453 stars 30 forks source link

Right prompt for shells not supporting it (bash, ion, powershell) #64

Closed fdncred closed 3 years ago

fdncred commented 3 years ago

I now have silver working (kind of) on windows but only the left side seems to work.

image

Here's the toml I'm using

[[left]]
name = "dir"
color.background = "blue"
color.foreground = "white"

[[left]]
name = "git"
color.background = "green"
color.foreground = "black"

[[right]]
name = "status"
color.background = "white"
color.foreground = "black"

[[right]]
name = "cmdtime"
color.background = "magenta"
color.foreground = "black"

[[right]]
name = "shell"
color.background = "green"
color.foreground = "black"

You can see in the screenshot that I changed the toml from black foreground to white just to see if it was seeing my toml file properly and it seems to be. Any ideas where to start with this?

thecaralice commented 3 years ago

Right prompt is currently only supported in zsh, fish and elvish, but you're free to contribute (changes should only be needed in init.ps1 file)

fdncred commented 3 years ago

can you point me to the place where it's being disallowed? I'm not seeing it.

thecaralice commented 3 years ago

It is not disallowed, it's just Powershell that doesn't have an API for adding right prompt

thecaralice commented 3 years ago

https://github.com/reujab/silver/blob/master/src/init.ps1 It uses only silver lprint command, for printing right prompt segments you use silver rprint command