In my .bashrc file I have:
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then . /etc/bash_completion; fi
I wanted to use []
around it instead of if then fi
I already have
[ -f ~/.bash_aliases ] && source ~/.bash_aliases
[ "${BASH_VERSINFO[0]}" -ge 4 ] && shopt -s autocd
[ -f ~/.git-completion.bash ] && source ~/.git-completion.bash
so I thought maybe I could use
[ [ -f /etc/bash_completion ] && [! shopt -oq posix] ] && . /etc/bash_completion
but I get
-bash: [: -f: binary operator expected
[ -f /etc/bash_completion ] && ! shopt -oq posix && . /etc/bash_completion
– gniourf_gniourf 2 days ago