From 05c10fad1d46a3071f4e89a54be57bcb4b7c875d Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Thu, 1 Oct 2009 17:13:03 +0200 Subject: [Env] finger with stderr redirection --- 10_Environment.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '10_Environment.zsh') diff --git a/10_Environment.zsh b/10_Environment.zsh index 0e0ef35..e2d7a62 100644 --- a/10_Environment.zsh +++ b/10_Environment.zsh @@ -71,10 +71,10 @@ SAVEHIST=42000 export GPG_TTY=`tty` # Display guess -CURRENT_DISPLAY=$(finger | tail -n+2 | grep -E $USER'[[:blank:]]+.*[[:blank:]]+tty[0-9][[:blank:]]+($DISPLAY)' | head -n1 | cut -d'(' -f2 | cut -d')' -f1) +CURRENT_DISPLAY=$(finger 2>&- | tail -n+2 | grep -E $USER'[[:blank:]]+.*[[:blank:]]+tty[0-9][[:blank:]]+($DISPLAY)' | head -n1 | cut -d'(' -f2 | cut -d')' -f1) if [ "$DISPLAY" = "" -a "$CURRENT_DISPLAY" = "" ] then - GUESS_DISPLAY=$(finger | tail -n+2 | grep -E $USER'[[:blank:]]+.*[[:blank:]]+tty[0-9]' | head -n1 | cut -d'(' -f2 | cut -d')' -f1) + GUESS_DISPLAY=$(finger 2>&- | tail -n+2 | grep -E $USER'[[:blank:]]+.*[[:blank:]]+tty[0-9]' | head -n1 | cut -d'(' -f2 | cut -d')' -f1) if [ "$GUESS_DISPLAY" != "" ] then export DISPLAY=$GUESS_DISPLAY -- cgit v1.2.3