zimfw / asciiship

A heavily reduced, ASCII-only version of the Spaceship and Starship prompts.
MIT License
19 stars 13 forks source link

Make it possible to always show hostname #5

Open thenktor opened 1 month ago

thenktor commented 1 month ago

Is your feature request related to a problem? Please describe.

Hi,

when working with zones/containers/jails you can enter them with tools like zlogin (OmniOS) or pct enter (Proxmox). But then you won't see the hostname, because it is not a ssh session.

Describe the solution you'd like

Make it configurable to always show the hostname.

Describe alternatives you've considered

A workaround is using another theme.

Additional context

No response

ericbn commented 1 month ago

@thenktor, is there an environment variable that is consistently set in all these scenarios that you describe that we could detect?

ericbn commented 1 month ago

If you want to customize the prompt, you can create your own fork and change the code accordingly. To always show the hostname:

-%(2L.%B%F{yellow}(%L)%f%b .)%(!.%B%F{red}%n%f%b in .${SSH_TTY:+"%B%F{yellow}%n%f%b in "})${SSH_TTY:+"%B%F{green}%m%f%b in "}%B%F{cyan}%~%f%b${(e)git_info[prompt]}${VIRTUAL_ENV:+" via %B%F{yellow}${VIRTUAL_ENV:t}%f%b"}${duration_info}
+%(2L.%B%F{yellow}(%L)%f%b .)%(!.%B%F{red}%n%f%b in .${SSH_TTY:+"%B%F{yellow}%n%f%b in "})%B%F{green}%m%f%b in %B%F{cyan}%~%f%b${(e)git_info[prompt]}${VIRTUAL_ENV:+" via %B%F{yellow}${VIRTUAL_ENV:t}%f%b"}${duration_info}