Browse Source

Update bash profile

pull/357/head
Xavier Petit 5 years ago
parent
commit
a74613b875
No known key found for this signature in database
GPG Key ID: CA3F2B17E25ABD26
  1. 26
      scripts/bash_tweaks.sh

26
scripts/bash_tweaks.sh

@ -8,8 +8,9 @@ cd $script_dir
# Makes bash case-insensitive # Makes bash case-insensitive
cat <<EOF>> /etc/inputrc cat <<EOF>> /etc/inputrc
set completion-ignore-case On set completion-ignore-case
set show-all-if-ambiguous on set show-all-if-ambiguous On
set show-all-if-unmodified On
EOF EOF
# Enhance Linux prompt # Enhance Linux prompt
@ -36,25 +37,32 @@ fi
EOF EOF
# Set-up all users # 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 do
# Hide login informations # Hide login informations
touch $DIR/.hushlogin touch $DIR/.hushlogin
# Add convenient aliases & behaviors # Add convenient aliases & behaviors
cat <<-'EOF'>> $DIR/.bashrc cat <<-'EOF'>> $DIR/.bashrc
HISTCONTROL=ignoreboth export LS_OPTIONS="--color=auto"
export HISTFILESIZE= eval "`dircolors`"
export HISTSIZE=
export HISTTIMEFORMAT="%F %T "
alias l="ls $LS_OPTIONS -al --si"
alias df="df --si" alias df="df --si"
alias du="du -cs --si" alias du="du -cs --si"
alias free="free -h --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" alias pstree="pstree -palU"
GOPATH=$HOME/go
HISTCONTROL=ignoreboth
HISTFILESIZE=
HISTSIZE=
HISTTIMEFORMAT="%F %T "
EOF EOF
# Fix rights # Fix rights
USR=$(echo "$DIR" | rev | cut -d/ -f1 | rev) USR=$(echo "$DIR" | rev | cut -d/ -f1 | rev)
chown -R $USR:$USR $DIR || true chown -R $USR:$USR $DIR ||:
done done

Loading…
Cancel
Save