I have a list of words that should be present in the order of appearance in completion to a certain key, but bash seems to be internally sorting what is assigned to COMPREPLY array. How to avoid that?Example:_comm() {    _init_completion -s -n : || return    case $prev in        -a) COMPREPLY=(zxy abcdef tyuu fgsfds)            ;;    esac}complete -F _comm commIf you run this code, bash should complete $ comm -a withabcdef fgsfds tyuu zxyi.e. sorted alphabetically.
Disable sorting of COMPREPLY in bash complete function
bash;autocomplete
Since Bash 4.4 you can use nosort option. In your example change last line tocomplete -o nosort -F _comm command you should get completions without alphabetical sorting.Important note: options (specified with -o) must precede functions (-F). Thats why coderofsalvations code didnt work.