From 7104acfa8b629fcd6af3cfb969e98fc68e815c11 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 8 Feb 2011 14:58:41 +0000 Subject: [PATCH] * Set the checkwinsize option in interactive shells. Otherwise bash may miss resize events (I guess SIGWINCH is only sent to the foreground process). svn path=/nixos/trunk/; revision=25815 --- modules/programs/bash/bashrc.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/programs/bash/bashrc.sh b/modules/programs/bash/bashrc.sh index c301ffde73a..5ce6b0ebd88 100644 --- a/modules/programs/bash/bashrc.sh +++ b/modules/programs/bash/bashrc.sh @@ -2,6 +2,11 @@ if [ -n "$NOSYSBASHRC" ]; then return fi +# In interactive shells, check the window size after every command. +if [ -n "$PS1" ]; then + shopt -s checkwinsize +fi + # Initialise a bunch of environment variables. export LD_LIBRARY_PATH=/var/run/opengl-driver/lib:/var/run/opengl-driver-32/lib # !!! only set if needed export MODULE_DIR=@modulesTree@/lib/modules