From a74613b87534d93dccf814faf3c48ba08b84bb03 Mon Sep 17 00:00:00 2001 From: Xavier Petit <32063953+xpetit@users.noreply.github.com> Date: Thu, 28 Nov 2019 19:57:23 +0000 Subject: [PATCH] Update bash profile --- scripts/bash_tweaks.sh | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/scripts/bash_tweaks.sh b/scripts/bash_tweaks.sh index 764467745..d2916641b 100755 --- a/scripts/bash_tweaks.sh +++ b/scripts/bash_tweaks.sh @@ -8,8 +8,9 @@ cd $script_dir # Makes bash case-insensitive cat <> /etc/inputrc -set completion-ignore-case On -set show-all-if-ambiguous on +set completion-ignore-case +set show-all-if-ambiguous On +set show-all-if-unmodified On EOF # Enhance Linux prompt @@ -36,25 +37,32 @@ fi EOF # Set-up all users -for DIR in $(ls -1d /root /home/* 2>/dev/null || true) +for DIR in $(ls -1d /root /home/* 2>/dev/null ||:) do # Hide login informations touch $DIR/.hushlogin # Add convenient aliases & behaviors cat <<-'EOF'>> $DIR/.bashrc - HISTCONTROL=ignoreboth - export HISTFILESIZE= - export HISTSIZE= - export HISTTIMEFORMAT="%F %T " - alias l="ls $LS_OPTIONS -al --si" + export LS_OPTIONS="--color=auto" + eval "`dircolors`" + alias df="df --si" alias du="du -cs --si" alias free="free -h --si" + alias l="ls $LS_OPTIONS -al --si" + alias less="less -i" + alias nano="nano -clDOST4" alias pstree="pstree -palU" + + GOPATH=$HOME/go + HISTCONTROL=ignoreboth + HISTFILESIZE= + HISTSIZE= + HISTTIMEFORMAT="%F %T " EOF # Fix rights USR=$(echo "$DIR" | rev | cut -d/ -f1 | rev) - chown -R $USR:$USR $DIR || true + chown -R $USR:$USR $DIR ||: done