[Bash-completion-devel] [patch] /etc/profile.d/bash_completion.sh

Ville Skyttä ville.skytta at iki.fi
Mon Dec 2 10:10:12 UTC 2013


On Sat, Nov 23, 2013 at 7:09 PM, Thilo Six <mlist at xk2c.de> wrote:
> Hello
>
> ,----[  /etc/profile.d/bash_completion.sh  ]--------
>
> - bash=${BASH_VERSION%.*}; bmajor=${bash%.*}; bminor=${bash#*.}
> - if [ $bmajor -gt 4 ] || [ $bmajor -eq 4 -a $bminor -ge 1 ]; then
> + if [[ ${BASH_VERSINFO[0]} -gt 4 ]] || \
> +  ( [[ ${BASH_VERSINFO[0]} -eq 4 ]] && [[ ${BASH_VERSINFO[1]} -ge 1 ]] ); then
> `-----------------------------------------------------------------------

Would you mind expanding a bit what the point of this modification is?
At least it cannot be done anywhere near as is because your version is
bash specific code but for stuff in /etc/profile.d we need to stick
with very basic bourne shell functionality -- it's not only bash that
sources scripts from that dir.



More information about the Bash-completion-devel mailing list