sindresorhus / pure

Pretty, minimal and fast ZSH prompt
MIT License
13.22k stars 978 forks source link

User and Hostname values #609

Closed railgadi closed 3 years ago

railgadi commented 3 years ago

Does user and hostname values are only visible for remote ssh sessions? I am unable to see these values when logged in to the my server. However can see those when I ssh into my server...

sindresorhus commented 3 years ago

How are you logged into your server when not using SSH?

railgadi commented 3 years ago

The usual way. From the login screen. Not remotely. I can see the username and host when I log in remotely using ssh. However when I do it from the login screen, it does not show it on the terminal. I tried changing to the default PS1 variable and able to see it. However when I use pure-prompt it does not show username and hostname. I am on a Centos 8 box and below are my pure prompt settings

source $ZSH/oh-my-zsh.sh

fpath+=$HOME/.zsh/pure

autoload -U promptinit; promptinit

PURE_CMD_MAX_EXEC_TIME=10

zstyle :prompt:pure:path color yellow

zstyle ':prompt:pure:prompt:*' color cyan

zstyle ':prompt:pure:user' color white

zstyle ':prompt:pure:virtualenv' color green

zstyle ':prompt:pure:host' color magenta

zstyle ':prompt:pure:user:root' color magenta

zstyle :prompt:pure:git:stash show yes

prompt pure

sindresorhus commented 3 years ago

It's working as intended. It only shows the host and username when you're not a local user, because if you're a local user, it's moot information.

railgadi commented 3 years ago

Thats what I suspected based on the word "remote"

host (242) - The hostname when on a remote machine. Thanks @sindresorhus !!