summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlav Vitters <olav@vitters.nl>2020-07-29 12:57:31 +0200
committerOlav Vitters <olav@vitters.nl>2020-07-29 12:57:31 +0200
commitb4031c7647e0df3ff745a06af7d1d59f6a389f16 (patch)
tree0671f21522168c6ad36c17a4189b9303f45d806c
parentf96c5cf4994959b669810ab9e3002edea543fdee (diff)
downloadsetup-b4031c7647e0df3ff745a06af7d1d59f6a389f16.tar
setup-b4031c7647e0df3ff745a06af7d1d59f6a389f16.tar.gz
setup-b4031c7647e0df3ff745a06af7d1d59f6a389f16.tar.bz2
setup-b4031c7647e0df3ff745a06af7d1d59f6a389f16.tar.xz
setup-b4031c7647e0df3ff745a06af7d1d59f6a389f16.zip
profile: set HISTCONTROL to ignoreboth if it was ignorespace, else fall back to ignoredups
-rw-r--r--profile8
1 files 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