- Package:
- libreadline8
- Source:
- readline
- Description:
- GNU readline and history libraries, run-time libraries
- Submitter:
- Josh Triplett
- Date:
- 2021-02-01 22:45:03 UTC
- Severity:
- wishlist
- Tags:
A versionsort sorts numbers by numeric value rather than comparing the ASCII values of characters from left to right. For example, it will sort the files 1, 10, 2 as 1, 2, 10. ls can versionsort files if given the -v option. Could bash have an option to versionsort completions when listing them? Thanks, Josh Triplett
With the attached patch to readline, if you set completion-version-sort (such as in ~/.inputrc), readline will version-sort completions. Without the patch, or with the patch but without setting completion-version-sort: josh@whisper:/tmp/t$ rlfe cat x Display all 100 possibilities? (y or n) x1 x16 x23 x30 x38 x45 x52 x6 x67 x74 x81 x89 x96 x10 x17 x24 x31 x39 x46 x53 x60 x68 x75 x82 x9 x97 x100 x18 x25 x32 x4 x47 x54 x61 x69 x76 x83 x90 x98 x11 x19 x26 x33 x40 x48 x55 x62 x7 x77 x84 x91 x99 x12 x2 x27 x34 x41 x49 x56 x63 x70 x78 x85 x92 x13 x20 x28 x35 x42 x5 x57 x64 x71 x79 x86 x93 x14 x21 x29 x36 x43 x50 x58 x65 x72 x8 x87 x94 x15 x22 x3 x37 x44 x51 x59 x66 x73 x80 x88 x95 x With the patched readline and with "set completion-version-sort on" in ~/.inputrc: josh@whisper:/tmp/t$ rlfe cat x Display all 100 possibilities? (y or n) x1 x9 x17 x25 x33 x41 x49 x57 x65 x73 x81 x89 x97 x2 x10 x18 x26 x34 x42 x50 x58 x66 x74 x82 x90 x98 x3 x11 x19 x27 x35 x43 x51 x59 x67 x75 x83 x91 x99 x4 x12 x20 x28 x36 x44 x52 x60 x68 x76 x84 x92 x100 x5 x13 x21 x29 x37 x45 x53 x61 x69 x77 x85 x93 x6 x14 x22 x30 x38 x46 x54 x62 x70 x78 x86 x94 x7 x15 x23 x31 x39 x47 x55 x63 x71 x79 x87 x95 x8 x16 x24 x32 x40 x48 x56 x64 x72 x80 x88 x96 x This should work in most programs that use readline. It doesn't work in bash; bash may override something in readline that prevents this from working. Note that the patch changes configure.in, so you need to re-run autoconf. I plan to submit this patch upstream as well. - Josh Triplett
Hi Josh, please could you update the patch for readline6, and forward it upstream. thanks, Matthias
Hi Josh, please could you update the patch for readline6, and forward it upstream. thanks, Matthias
I submitted the previous patch upstream <http://lists.gnu.org/archive/html/bug-readline/2007-09/msg00001.html>, and didn't receive any response whatsoever. Suggestions on a better place to send it? Unfortunately it looks like readline lacks a bug-tracking system. In any case, I can certainly update the patch and resend. - Josh Triplett
Dear submitter, as the package readline5 has just been removed from the Debian archive unstable we hereby close the associated bug reports. We are sorry that we couldn't deal with your issue properly. For details on the removal, please see https://bugs.debian.org/980504 The version of this package that was in Debian prior to this removal can still be found using http://snapshot.debian.org/. Please note that the changes have been done on the master archive and will not propagate to any mirrors until the next dinstall run at the earliest. This message was generated automatically; if you believe that there is a problem with it please contact the archive administrators by mailing ftpmaster@ftp-master.debian.org. Debian distribution maintenance software pp. Joerg Jaspert (the ftpmaster behind the curtain)