From 7dcbdc5ddfb98ee7117dbf432c5c90aa03e3ee96 Mon Sep 17 00:00:00 2001 From: Von Random Date: Wed, 9 Dec 2015 13:28:29 +0300 Subject: [PATCH] replace hostname with fqdn because teh conventions --- shellrc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/shellrc b/shellrc index 070d582..b0d8871 100644 --- a/shellrc +++ b/shellrc @@ -14,6 +14,11 @@ else alias whence='type -P' fi +export fqdn="$(hostname -f)" +if [[ -z ${fqdn} ]]; then + export fqdn="${HOSTNAME}" +fi + newline=" " vscripts="${HOME}/vscripts" @@ -77,7 +82,7 @@ fi # ls if [[ ${OSTYPE} == freebsd* ]]; then alias ls='command ls -G ' -elif [[ ${OSTYPE} == 'linux-gnu' || ${OSTYPE} == 'cygwin' ]] && [[ ${HOSTNAME} != *pvc* ]]; then +elif [[ ${OSTYPE} == 'linux-gnu' || ${OSTYPE} == 'cygwin' ]] && [[ ${fqdn} != *pvc* ]]; then alias ls='command ls --color=auto --group-directories-first ' fi alias la='ls -FA' @@ -246,7 +251,7 @@ if is_zsh; then rb=' ]' bb=':' prompt_user='%(1000#..%(1205#..%F{red}%n%f%b ))' - prompt_host='%M' + prompt_host=${fqdn} prompt_cwd='%B%d%b' prompt_bang='%(!.%F{red}>%f.%B>%b)' prompt_jobs='%(1j. jobs:%B%F{red}%j%f%b.)' @@ -366,7 +371,7 @@ else lb="[ " rb=" ]" bb=":" - prompt_host="$HOSTNAME" + prompt_host="${fqdn}" prompt_bang=">${reset}" precmd() { if [[ -z ${hide_info} ]]; then