[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-readline] RFE: use of colour with show-all-if-ambiguous
From: |
Richard Neill |
Subject: |
[Bug-readline] RFE: use of colour with show-all-if-ambiguous |
Date: |
Wed, 22 Jun 2011 22:43:13 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110424 Lightning/1.0b2 Thunderbird/3.1.10 |
Dear All,
Here's a UI idea for readline, that I think would be helpful.
When a partial completion is shown, denote the remaining, unmatched part
of the listed elements (from show-all-if-ambiguous) in colour.
This will make visual grep much easier for the user.
Here is an example. On my current system, I have lots of entries in
/usr/src/linux*:
$ ls -d /usr/src/linux*
/usr/src/linux@ /usr/src/linux-2.6.27.19-1mnb/
/usr/src/linux-2.6.27.4-2mnb/ /usr/src/linux-2.6.27.45-1mnb/
/usr/src/linux-2.6.33.7-2mnb/ /usr/src/linux-2.6.36.2-2mnb/
If I navigate through them, using tab-completion, I might, for example
enter:
$ ls -d /usr/src/linux-2.6.2 [TAB]
and the following is printed:
linux-2.6.27.19-1mnb/ linux-2.6.27.4-2mnb/ linux-2.6.27.45-1mnb/
$ ls -d /usr/src/linux-2.6.27.
In this case, it's quite hard to immediately see exactly where I have
got to within the completion. (in this particular case, the [TAB] got me
"7.")
What would be really nice is if the printout were to use either colour
or the terminal's bold font to distinguish the matched and unmatched
parts. For example, it might print:
linux-2.6.27.19-1mnb/ linux-2.6.27.4-2mnb/ linux-2.6.27.45-1mnb/
------- ------- --------
$ ls -d /usr/src/linux-2.6.27.
(I've used underlining to denote the part to be coloured)
which would make it really easy for me to see that the next character I
should enter must be either a 1 or a 4.
This problem isn't serious when tab-completing/navigating through most
of the unix directory tree (because the files are short, distinct, and
mainly lower-case letters which are easy to read), but it does become
ugly when a directory contains a list of long, similarly-named files
containing mostly numeric/punctuation characters. Another example that
springs to mind is per-host config-files named for the MAC-addresses of
the machines.
One way to control the use of colour might be via the environment
variables, similar to the way "grep" and "ls" use colour highlighting.
I hope that's useful. Thank you for your time.
Regards,
Richard
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug-readline] RFE: use of colour with show-all-if-ambiguous,
Richard Neill <=