dabbrev-expand completions are sorted
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-redhat-linux-gnu' -DCONF_VENDOR='redhat' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H -I. -I. -I./include -I./lib -D_GNU_SOURCE -DRECYCLES_PIDS -DDEFAULT_PATH_VALUE='/usr/local/bin:/usr/bin' -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic uname output: Linux us124 3.18.28-3999105.Arora18release.1.fc18.x86_64 #1 SMP Mon Dec 26 00:35:18 PST 2016 x86_64 x86_64 x86_64 GNU/Linux Machine Type: x86_64-redhat-linux-gnu Bash Version: 4.3 Patch Level: 42 Release Status: release Description: dabbrev-expand supposed to menu complete using history where most recent entries are presented first. However, it seems like the entries are sorted. This is from the release notes of bash-4.1: "Changes to dabbrev-expand to make it more `emacs-like': no space appended after matches, completions are not sorted, and most recent history entries are presented first. This bug has been verified on bash 4.4 as well as on bash 4.3. Repeat-By: Execute in this order: $ ls ~/tmp1 $ ls ~/tmp2 $ ls ~/tmp3 then begin typing: $ ls ~/t and press dabbrev-expand shortcut key. This appears: $ ls ~/tmp1 press dabbrev-expand key again, and this appears: $ ls ~/tmp2 press dabbrev-expand key again, and this appears: $ ls ~/tmp3
Re: dabbrev-expand completions are sorted
Thanks Chet. I found out it happens only when I have this one is in my .inputrc: set completion-ignore-case on Regards, Roee > On Mar 15, 2017, at 04:50, Chet Ramey wrote: > > On 3/15/17 1:54 AM, r...@arista.com wrote: > >> Bash Version: 4.3 >> Patch Level: 42 >> Release Status: release >> >> Description: >> dabbrev-expand supposed to menu complete using history where most >> recent entries are presented first. However, it seems like the entries are >> sorted. >> This is from the release notes of bash-4.1: "Changes to dabbrev-expand >> to make it more `emacs-like': no space appended after matches, completions >> are not sorted, and most recent history entries are presented first. >> This bug has been verified on bash 4.4 as well as on bash 4.3. > > I can't reproduce this on bash-4.4. If I bind dabbrev-expand to, say, > "\C-x\C-d" and follow the steps in your report, I cycle through ~/tmp3, > ~/tmp2, and ~/tmp1 as possible completions when I hit C-xC-d. > > You might check whether or not you have a programmable completion for `ls' > that could be sorting the matches. > > Chet > -- > ``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: dabbrev-expand completions are sorted
Also, not as serious as the bug below, if you have 'set show-all-if-ambiguous on’ on your .inputrc, it shows all matching on dabbrev-expand as well (I don’t think it should). > On Mar 15, 2017, at 10:56, Roee Bar wrote: > > Thanks Chet. > > I found out it happens only when I have this one is in my .inputrc: > set completion-ignore-case on > > Regards, > Roee > >> On Mar 15, 2017, at 04:50, Chet Ramey wrote: >> >> On 3/15/17 1:54 AM, r...@arista.com wrote: >> >>> Bash Version: 4.3 >>> Patch Level: 42 >>> Release Status: release >>> >>> Description: >>> dabbrev-expand supposed to menu complete using history where most >>> recent entries are presented first. However, it seems like the entries are >>> sorted. >>> This is from the release notes of bash-4.1: "Changes to dabbrev-expand >>> to make it more `emacs-like': no space appended after matches, completions >>> are not sorted, and most recent history entries are presented first. >>> This bug has been verified on bash 4.4 as well as on bash 4.3. >> >> I can't reproduce this on bash-4.4. If I bind dabbrev-expand to, say, >> "\C-x\C-d" and follow the steps in your report, I cycle through ~/tmp3, >> ~/tmp2, and ~/tmp1 as possible completions when I hit C-xC-d. >> >> You might check whether or not you have a programmable completion for `ls' >> that could be sorting the matches. >> >> Chet >> -- >> ``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: dabbrev-expand completions are sorted
There is no ambiguous in dabbrev-expand - it is well defined what the completion should be: each key press cycles through the matches from most recent to oldest match. This is different than TAB completion, where it is possible to have several matches so it makes sense to display them. That is also the dabbrev-expand behaviour in tcsh when ‘autolist’ (i.e. 'show-all-if-ambiguous’ ) is set. Also, have you succeeded reproducing the original dabbrev-expand bug with completion-ignore-case set? > On Mar 16, 2017, at 08:56, Chet Ramey wrote: > > On 3/15/17 4:25 PM, Roee Bar wrote: >> Also, not as serious as the bug below, if you have 'set >> show-all-if-ambiguous on’ on your .inputrc, it shows all matching on >> dabbrev-expand as well (I don’t think it should). > > I think it should. If you have that variable enabled, you want it to act > consistently for all completions. > > -- > ``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/