Re: Ignore-case option to readline disables nosort option to complete

2017-05-03 Thread Jesper Nygårds
On Wed, May 3, 2017 at 4:30 PM, Eduardo Bustamante 
wrote:

>
> I think this was fixed as a consequence of the following thread:
> https://lists.gnu.org/archive/html/bug-bash/2017-03/msg00092.html
>
> In this commit:
> http://git.savannah.gnu.org/cgit/bash.git/commit/?h=devel=
> f698849a75fc781472806182c3dc930077a5d828
>

Oh, I see. Sorry for the noise, then. Great to see that it's fixed already.


Re: Ignore-case option to readline disables nosort option to complete

2017-05-03 Thread Chet Ramey
On 5/3/17 10:30 AM, Eduardo Bustamante wrote:

> I think this was fixed as a consequence of the following thread:
> https://lists.gnu.org/archive/html/bug-bash/2017-03/msg00092.html
> 
> In this commit:
> http://git.savannah.gnu.org/cgit/bash.git/commit/?h=devel=f698849a75fc781472806182c3dc930077a5d828

This looks right.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRUc...@case.eduhttp://cnswww.cns.cwru.edu/~chet/



Re: Ignore-case option to readline disables nosort option to complete

2017-05-03 Thread Eduardo Bustamante
On Wed, May 3, 2017 at 8:59 AM, Jesper Nygårds  wrote:
> The following snippet is shows that if the readline
> option completion-ignore-case is turned on, the nosort option to complete
> has no effect:

I'm unable to reproduce this using the code from the devel branch:

bash-4.4$
GNU bash, version 4.4.12(3)-maint (x86_64-unknown-linux-gnu)
bash-4.4$ . on
bash-4.4$ bind -V | grep ignore-case
completion-ignore-case is set to `on'
bash-4.4$ foo
zoo  noo  boo
bash-4.4$ . off
bash-4.4$ bind -V | grep ignore-case
completion-ignore-case is set to `off'
bash-4.4$ foo
zoo  noo  boo
bash-4.4$ cat on
bind "set completion-ignore-case on"

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

complete -o nosort -F _foo foo
bash-4.4$ cat off
bind "set completion-ignore-case off"

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

complete -o nosort -F _foo foo
bash-4.4$ git rev-parse HEAD
2a39157723ffb7dfc597dfa46b5b6fbd93cc9ea2



I think this was fixed as a consequence of the following thread:
https://lists.gnu.org/archive/html/bug-bash/2017-03/msg00092.html

In this commit:
http://git.savannah.gnu.org/cgit/bash.git/commit/?h=devel=f698849a75fc781472806182c3dc930077a5d828



Ignore-case option to readline disables nosort option to complete

2017-05-03 Thread Jesper Nygårds
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.