The following snippet is shows that if the readline
option completion-ignore-case is turned on, the nosort option to complete
has no effect:

bind "set completion-ignore-case on"

_foo() {
    COMPREPLY=( zoo noo boo )
    return 0
}

complete -o nosort -F _foo foo

With the ignore-case option turned on, completion on foo gives "boo noo
zoo", i.e. in alphabetical order. If the ignore-case is not turned on,
completion on foo gives the intended order "zoo noo boo".

It seems to me that this is not ideal: it would be nice to have both
case-insensitive completion AND the possibility to keep the intended order
for alternatives.

Reply via email to