LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   coloring TAB output for filename completion (https://www.linuxquestions.org/questions/linux-newbie-8/coloring-tab-output-for-filename-completion-708739/)

glinux 03-02-2009 10:34 PM

coloring TAB output for filename completion
 
Hi,

on the command line when i hit the tab key to complete a filename a list of optional filenames appear.

the problem is these filenames share the same initial characters making it difficult to efficiently distinguish amongst them. i find myself re-reading the beginning of the filenames, the redundant part of the names rather then focusing in quickly on the distinguishing and relevant parts of the displayed names.

this is most notable when numerous files are listed and is particularly a problem when all the filenames share the same string but differ by a single character; this distinguishing character may occur at the end of the filenames, making it relatively easy to pick out the relevant filename or may not, making it arduous to selcted the appropriate file.

is it possible to edit the code related to the TAB key so that when it is hit, the output is colored from the point where the filenames differ?

for example, i would like the following to be displayed(in color) on attempting a file completion:

$ cat filename<TAB>
filename123
filenameHere
filenameAnother

glinux


All times are GMT -5. The time now is 03:52 AM.