bash-completion-20060301-alt06 bash-3.2.39-alt2 At the beginning of /etc/bash_completion, there is a code piece which is broken (doesn't meet its purpose): # Alter the following to reflect the location of this file. # { # These declarations must go within braces in order to be able to silence # readonly variable errors. BASH_COMPLETION="${BASH_COMPLETION:-/etc/bash_completion}" BASH_COMPLETION_DIR="${BASH_COMPLETION_DIR:=/etc/bash_completion.d}" } 2>/dev/null || : readonly BASH_COMPLETION BASH_COMPLETION_DIR because if one sources it a second time, it actually bails out at this place rather than silently ignoring the errors from the reassignments of the "readonlies" as intended. Illustration: $ readonly x=1; { x="${x:-2}"; } 2> /dev/null || :; echo PASSED $ If it worked as it was intended by the author, PASSED would be printed. Probably, the solution would be to use the form "${x:=2}" instead of the present assignments: $ readonly x=1; { : ${x:=2}; } 2> /dev/null || :; echo "PASSED with x holding '$x'." bash: x: readonly variable PASSED with x holding '1'. $ Demonstration: Tracing what actually happens when sourcing the current variant for a second time: [ivan@dell ~]$ set -x; . /etc/bash_completion + . /etc/bash_completion ++ '[' -n '' ']' ++ set +v ++ echo -ne '\033]0;ivan@dell: /home/ivan\007' [ivan@dell ~]$ This error makes it inconvenient to test a new ~/.bash_profile like this: $ . ~/.bash_profile because this way it stops processing at /etc/bash_completion.
Похоже, починилось.