From b4031c7647e0df3ff745a06af7d1d59f6a389f16 Mon Sep 17 00:00:00 2001 From: Olav Vitters Date: Wed, 29 Jul 2020 12:57:31 +0200 Subject: profile: set HISTCONTROL to ignoreboth if it was ignorespace, else fall back to ignoredups --- profile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/profile b/profile index 639c91b..2515059 100644 --- a/profile +++ b/profile @@ -53,11 +53,15 @@ umask 022 USER=`id -un` LOGNAME=$USER MAIL="/var/spool/mail/$USER" -HISTCONTROL=ignoredups HOSTNAME=`/usr/bin/hostnamectl --transient 2>/dev/null` HISTSIZE=1000 +if [ "$HISTCONTROL" = "ignorespace" ] ; then + export HISTCONTROL=ignoreboth +else + export HISTCONTROL=ignoredups +fi -if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then +if [ -z "$INPUTRC" ] && [ ! -f "$HOME/.inputrc" ]; then INPUTRC=/etc/inputrc fi -- cgit v1.2.1