Testing how bash's help builtin responds to each character. For some reason, while `help -d 'c'` prints the same thing as `help -c 'c*'` (note the asterisk), the same is not true when the character is left-bracket: `help -c '[*'. This issue persists on bash 5.3 beta.
# Input: [liveuser@fedora ~]$ fn () { help -d "$1" 2> /dev/null \ | sed -e '/^Shell commands matching keyword/d' -e '/^$/d' \ | wc; }; for init in {a..z} '%' '(' '.' ':' '[' '{'; do str_a=${init}; str_b="${init}*"; out_a=$( fn "${str_a}" ); out_b=$( fn "${str_b}" ); if [[ ${out_a} != "${out_b}" ]]; then mismatches+=( "${init}" ); fi; done; declare -p mismatches; unset {str,out}_{a,b} mismatches # Output: declare -a mismatches=([0]="[") # With and without asterisks at (awk-style) field 3 [liveuser@fedora ~]$ help -d '[' | sed -e '/^Shell commands matching keyword/d' -e '/^$/d' | wc 1 5 37 [liveuser@fedora ~]$ help -d '[*' | sed -e '/^Shell commands matching keyword/d' -e '/^$/d' | wc 2 12 78 # With and without \wc\ at the end of the pipeline. [liveuser@fedora ~]$ help -d '[' | sed -e '/^Shell commands matching keyword/d' -e '/^$/d' [ - Evaluate conditional expression. [liveuser@fedora ~]$ help -d '[*' | sed -e '/^Shell commands matching keyword/d' -e '/^$/d' [ - Evaluate conditional expression. [[ ... ]] - Execute conditional command. Thanks, Wiley