From c94e1368e754c1345c9213b700420e468fdc13fa Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Fri, 17 Apr 2015 16:42:41 +0200 Subject: Merged from Anevia. --- 01_Internal.zsh | 2 +- 10_Environment.zsh | 2 +- 12_Prompts.zsh | 3 ++- zsh-syntax-highlighting | 2 +- zshrc | 5 +++-- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/01_Internal.zsh b/01_Internal.zsh index 881ec07..217b013 100644 --- a/01_Internal.zsh +++ b/01_Internal.zsh @@ -685,7 +685,7 @@ _process_tree() { for leaf in ${@:-$$} do - ps -eo pid,ppid,command | awk -v leaf="$leaf" \ + ps -eo pid,ppid,command 2>&- | awk -v leaf="$leaf" \ '{ parent[$1]=$2 ; command[$1]=$3 ; diff --git a/10_Environment.zsh b/10_Environment.zsh index c793d3c..6d33610 100644 --- a/10_Environment.zsh +++ b/10_Environment.zsh @@ -94,7 +94,7 @@ HISTSIZE=$(( $SAVEHIST * 1.10 )) export GPG_TTY=`tty` # YeahConsole.. -if ( ps x | grep $$ -B1 | grep -q yeahconsole ) +if ( ps x 2>&- | grep $$ -B1 | grep -q yeahconsole ) then _yeahconsole=true fi diff --git a/12_Prompts.zsh b/12_Prompts.zsh index d252b05..c8b791f 100644 --- a/12_Prompts.zsh +++ b/12_Prompts.zsh @@ -315,7 +315,8 @@ __two_lines_prompt () PS1_+=$(__show_date) PS1_+=" -"$C_$_prompt_colors[user]$_C"${USER:-%n}"$C_$_prompt_colors[arob]$_C"@"$C_$_prompt_colors[host]$_C"%M${SSH_CLIENT:+ ← $(host ${SSH_CLIENT/ */} | awk '{ gsub(/\.$/, "", $NF); gsub(/.'$DOMAIN'$/, "", $NF); print $NF }')} "$CURDIR${VCSBRANCH:+ $VCSBRANCH} +"$C_$_prompt_colors[user]$_C"${USER:-%n}"$C_$_prompt_colors[arob]$_C"@"$C_$_prompt_colors[host]$_C"%M${SSH_CLIENT:+ ← $(host ${SSH_CLIENT/ */} | awk '/not found/ { print "'${SSH_CLIENT/ */}'" ; exit } { gsub(/\.$/, "", $NF); gsub(/.'$DOMAIN'$/, "", $NF); print $NF }')} "$CURDIR${VCSBRANCH:+ $VCSBRANCH} + __debug "-----------------> extra..." PS1_+=$(__ps1_extrainfo) __debug "-----------------> PS1..." diff --git a/zsh-syntax-highlighting b/zsh-syntax-highlighting index 3dc5741..5320f1e 160000 --- a/zsh-syntax-highlighting +++ b/zsh-syntax-highlighting @@ -1 +1 @@ -Subproject commit 3dc574190071ef59054f6d693132410b37aa3ae4 +Subproject commit 5320f1e18d5782e29a6637937e37a3aecf9327bb diff --git a/zshrc b/zshrc index 8c1a7f6..499ad3c 100644 --- a/zshrc +++ b/zshrc @@ -6,12 +6,12 @@ # # If you want to add a file, name it specifically in the form # -# $ZDOTDIR/??_*.zsh +# $ZDOTDIR/??_*.zsh # # Where "??" should be a two-digit number. # With that, file ``10_Toto.zsh'' would be parsed before # file ``20_Tutu.zsh'', allowing you ordering your scripts. -# +# # If you want to make user, host or network specific configurations, # add your specific scripts to the folders # - "sys:$(uname -s)" for OS-specific conf, @@ -38,6 +38,7 @@ HOST=$HOST:r HOST=${HOST:-$(hostname -s)} DOMAIN=$(hostname -a 2>&-| sed 's/^[^\.]*\.\?//') DOMAIN=${DOMAIN:-$(hostname -d 2>&-)} +DOMAIN=${DOMAIN:-$(hostname -y 2>&-)} [ "$DOMAIN" = "" -o "$DOMAIN" = "localdomain" -o "$DOMAIN" = "(none)" ] && DOMAIN=$(grep "^search " /etc/resolv.conf | cut -d' ' -f2) ## Agent de clefs SSH/GPG -- cgit v1.2.3