diff options
author | Olav Vitters <olav@vitters.nl> | 2020-07-29 12:57:31 +0200 |
---|---|---|
committer | Olav Vitters <olav@vitters.nl> | 2020-07-29 12:57:31 +0200 |
commit | b4031c7647e0df3ff745a06af7d1d59f6a389f16 (patch) | |
tree | 0671f21522168c6ad36c17a4189b9303f45d806c | |
parent | f96c5cf4994959b669810ab9e3002edea543fdee (diff) | |
download | setup-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-- | profile | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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 |