Last active
August 29, 2015 14:00
-
-
Save syphoxy/a159ec274d41e5a7db24 to your computer and use it in GitHub Desktop.
show machine name in zsh prompt if connected through ssh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function precmd { | |
local SSH_STATUS="" | |
if [ -n "$SSH_CONNECTION" ] | |
then | |
SSH_STATUS="%m " | |
fi | |
PROMPT="${SSH_STATUS}%1~ %B%#%b " | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment