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 comm
If you run this code, bash should complete
$ comm -a
with
abcdef fgsfds tyuu zxy
i.e. sorted alphabetically.