dot

packages and services management
Log | Files | Refs | README

commit f82322dbfa16a03bc2e0cf86875f7414e5311349
parent f8cfa01f8827cb2f628ad690bb9d49094681c7d0
Author: Josuah Demangeon⠠⠵ <mail@josuah.net>
Date:   Mon,  6 Mar 2017 11:42:01 +0100

Printing hostname on SSH

Diffstat:
M.profile | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.profile b/.profile @@ -28,11 +28,11 @@ export PAGER='less' MANPAGER='less -R' DVTM_PAGER='less -R' export PS1='$( [ "$?" -gt 0 ] && color="1" || color="7" [ "${PWD##$HOME*}" ] && pwd="$PWD" || pwd="~${PWD#$HOME}" || pwd - [ "$SSH_CONNECTION" ] && printf %s "$(hostname)" + [ "$SSH_CONNECTION" ] && host=" $(hostname)" printf "\033[?6c" # TTY cursor shape printf "\033]0;%s\007" "$pwd" # terminal name - printf "\n%s \033[1;3%dm•\033[m%s " "$(git-prompt)" "$color" + printf "\n%s%s \033[1;3%dm•\033[m%s " "$host" "$(git-prompt)" "$color" )' export PS2=': ' export PS3=': '