1
0
Fork 0
mirror of https://github.com/hcartiaux/dotfiles.git synced 2024-10-18 17:25:23 +02:00

[bash] bashrc, shfmt run

This commit is contained in:
Hyacinthe Cartiaux 2018-02-25 13:08:54 +01:00
parent 41b2f556d4
commit 3e1445243e

View file

@ -44,7 +44,7 @@ fi
# Eventually load you private settings (not exposed here) # Eventually load you private settings (not exposed here)
test -f ~/.bash_private && test -f ~/.bash_private &&
. ~/.bash_private . ~/.bash_private
# MOTD # MOTD
test -n "$INTERACTIVE" -a -n "$LOGIN" && ( test -n "$INTERACTIVE" -a -n "$LOGIN" && (
@ -58,7 +58,7 @@ test -n "$INTERACTIVE" -a -n "$LOGIN" && (
# bring in system bashrc # bring in system bashrc
test -r /etc/bashrc && test -r /etc/bashrc &&
. /etc/bashrc . /etc/bashrc
# bring in git prompt # bring in git prompt
. ~/.git-prompt.sh . ~/.git-prompt.sh
@ -82,13 +82,14 @@ umask 0022
# BASH COMPLETION # BASH COMPLETION
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
bash=${BASH_VERSION%.*}; bmajor=${bash%.*}; bminor=${bash#*.} bash=${BASH_VERSION%.*}
bmajor=${bash%.*}
bminor=${bash#*.}
test -n "$PS1" && test $bmajor -gt 1 && ( test -n "$PS1" && test $bmajor -gt 1 && (
# search for a bash_completion file to source # search for a bash_completion file to source
for f in /usr/local/etc/bash_completion \ for f in /usr/local/etc/bash_completion \
/opt/local/etc/bash_completion \ /opt/local/etc/bash_completion \
/etc/bash_completion /etc/bash_completion; do
do
test -f $f && ( test -f $f && (
. $f . $f
break break
@ -119,8 +120,7 @@ __svn_ps1() {
svnversion=$(svnversion | sed -e "s/[:M]//g") svnversion=$(svnversion | sed -e "s/[:M]//g")
# Continue if $svnversion is numerical # Continue if $svnversion is numerical
let $svnversion let $svnversion
if [[ "$?" -eq "0" ]] if [[ $? -eq "0" ]]; then
then
printf " (svn:%s)" "$(svnversion)" printf " (svn:%s)" "$(svnversion)"
fi fi
) 2>/dev/null ) 2>/dev/null
@ -266,4 +266,3 @@ fi
if [ -f ~/.bash_slurm ]; then if [ -f ~/.bash_slurm ]; then
. ~/.bash_slurm . ~/.bash_slurm
fi fi