Clear screen only after confirmation
This commit is contained in:
parent
8ebea88538
commit
31a993b62a
1 changed files with 11 additions and 3 deletions
|
@ -1,10 +1,18 @@
|
|||
# This file is sourced by a login shell upon logout
|
||||
|
||||
# Clear the screen to increase privacy
|
||||
# Clear the screen (if desired) to increase privacy
|
||||
if [ "$SHLVL" = 1 ]; then
|
||||
if [ -x /usr/bin/clear ]; then
|
||||
read -p "Clear screen? " -n 1 -r
|
||||
echo
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||
/usr/bin/clear
|
||||
fi
|
||||
elif [ -x /usr/bin/clear_console ]; then
|
||||
read -p "Clear screen? " -n 1 -r
|
||||
echo
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||
/usr/bin/clear_console -q
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue