Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 03-02-2009, 10:34 PM   #1
LQ Newbie
Registered: Feb 2009
Posts: 7

Rep: Reputation: 0
coloring TAB output for filename completion


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>



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
no tab completion maddocks AIX 2 12-27-2007 01:10 PM
Tab-completion kzr_merchant Programming 2 12-17-2007 04:00 PM
TAB Auto Completion rsmccain Linux - Software 6 11-20-2007 09:47 PM
Tab completion with sudo extrasolar Slackware 8 08-22-2006 02:46 PM
tab completion with scp fsbooks Linux - General 5 04-07-2005 03:13 PM

All times are GMT -5. The time now is 03:20 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration