-
-
Notifications
You must be signed in to change notification settings - Fork 982
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: Add option to disable @hostname
in prompt
#614
Comments
Change it how exactly? |
I have installed pure theme on my docker image, i got this prompt :
I want hide the hostname part to display only "docker ~" |
Per #564 (comment), we are open to adding an option for this. |
@sindresorhus Can't you just hide hostname if we are on container ? Replace line on file : https://github.com/sindresorhus/pure/blob/main/pure.zsh # Show `username@host` if inside a container and not in GitHub Codespaces.
[[ -z "${CODESPACES}" ]] && prompt_pure_is_inside_container && username='%F{$prompt_pure_colors[user]}%n%f'"$hostname" By # Show `username@host` if inside a container and not in GitHub Codespaces.
[[ -z "${CODESPACES}" ]] && prompt_pure_is_inside_container && username='%F{$prompt_pure_colors[user]}%n%f' |
@acantepie while I can appreciate the (somewhat) aesthetic improvement, how would you differentiate between two open containers? We'd also have to adjust the logic for the root user which, without changes, would display the hostname. Removing the hostname there would IMO also create a color-imbalance (only the white username). |
Indeed, I have finally define a custom hostname on my docker-compose. |
@sindresorhus Is it possible to always show username@hostname, even when I have not ssh'ed into a machine? |
@reportaman Anything is possible by modifying the prompt yourself, but it's not something we plan to support built-in. |
@sindresorhus what's the action-point for this issue? I'm not entirely sure if it's adding an option for disabling the showing of Of the two, I think only the former is possible. |
@mafredri The former. |
@hostname
in prompt
@sindresorhus I would second @poetaman's ask for an option to always show the I am happy to open up a new issue and/or submit a PR. |
I want to change user@hostname on prompt , is it possible to doing that ?
The text was updated successfully, but these errors were encountered: