summaryrefslogtreecommitdiff
path: root/10_Environment.zsh
diff options
context:
space:
mode:
authorHugues Hiegel <hugues.hiegel@openwide.fr>2009-10-01 17:13:03 +0200
committerHugues Hiegel <hugues.hiegel@openwide.fr>2009-10-01 17:13:03 +0200
commit05c10fad1d46a3071f4e89a54be57bcb4b7c875d (patch)
tree28fb32685a71121bcf96b517335910fecd399298 /10_Environment.zsh
parente5f39ec71ed08d04ef3a38f3bc56ebfeaaf1e49b (diff)
[Env] finger with stderr redirection
Diffstat (limited to '10_Environment.zsh')
-rw-r--r--10_Environment.zsh4
1 files changed, 2 insertions, 2 deletions
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